Eye contact triggers a dominance response in most animals if it's sustained, iirc. If you try to stare down an animal, don't be surprised if it attacks you! It works the same way in humans, so far as I know. So establishing eye contact is a way that we negotiate dominance hierarchies in human communities. We make contact, then look away, to let the other person know that we mean them no harm, because looking away is a sign of submission. Staring is taken as a challenge. If you're a man and you stare at another man, don't be surprised if he attacks you, haha.
For opposite sex (or same-sex in appropriate contexts) staring is taken as an expression of sexual interest, which is why repeatedly making eye contact is a form of flirting. (If they're avoiding making eye contact, they're probably not interested. Unless, ofc, they have anxiety!)
The reason they tell you to make eye contact is because people who refuse to make eye contact are typically taken as being untrustworthy ("shifty") and it puts people on the defensive. But staring is even worse and tends to create a fight or flight response. At least, that's my understanding of it.
I generally try to make eye contact when I initially approach someone, and smile, and then look away. That's my "I come in peace" routine. I generally avoid eye-contact after that because it makes me very uncomfortable. If I have to talk to someone for any length of time, I'll make eye contact again generally every few minutes to let them know I'm listening. Aside from initial contact, I don't think people make much of an effort to look me in the eye. And they rarely return my smile. I mostly get impatient or disgusted looks, which quickly turns into indifference.
Beauty isn't everything. It's the only thing.