Karaline,
Most men who molest boys aren't homosexual in the usual sense of the word -- they aren't sexually attracted to adult men. There are some studies on this, I can find them for you if you're interested.
Guys who are gay like guys for the same reason girls who are straight like guys. Why can't they go for girls? Well, why can't you?
People don't choose who they're attracted to.