As for why they want to search for pedophiles at airports: the reason is presumably because there is a serious problem of child sex tourism in certain countries (Thailand for example).
You could use the same argument about guns or drugs -- why search people who they suspect are carrying guns or drugs? The reasoning is presumably that stopping these at the border prevents them from coming into the country.
To be honest I don't have a problem with being searched at airports. IMO the small inconvenience is outweighed by the benefit of putting the occasional pedophile in jail, preventing diseases from fruit/meat entering our country, and criminals bringing machine guns into the country, etc. I guess from the downvotes and comments that a lot of HN posters have a different opinion.