Attraction is obviously not all physical and can be a weird thing. I've met very very attractive women who after spending five minutes with them and experiencing there personality they can seem very ugly indeed.
Conversely you can meet someone who you don't find attractive at first then you talk their personality shines and you can be really attracted. Sense of humor, for a lot of people, can be a great influence.
The scientific explaination of 'The function of attraction' is for you to find the healthiest genes you can mix with your own i.e beauty is a sign of fitness. In fact if you think about your genes have a root stretching right back to the earliest life (goey blobs). Others just died off because they're not attractive/fit for the environment or just plain unlucky.
Not sure how that works with homosexuality

Then theres pedophilia, necrophilia etc. All these occur in
nature so you cant explain them away with 'culture'
Thing is the 'sexual attraction' is important and is hard wired in the brain and our brains are complex things to state the obvious. Then (to contradict myself) lump on religion, culture, upbringing etc. When I was India 18 years ago a male with a fat belly was attractive because it was a sign of ability to acquire food and wealth.
Thing is you cant rationalize it and you cant con yourself into thinking someone is really attractive. I know from myself sex, love and physical attraction are intertwined and if one is missing like oxygen from fire it dies.
Sorry if i've rambled a bit.