Sexuality is an integral part of our make-up, developed through millions of years of evolution to make opposite sexes attractive. It's part of the species imperative for procreation. So unless both friends are homosexual there will inevitably be at least some measure of sexual tension. With close friends you tend to spend a lot of time with one another, which tends to increase the emotional attraction, at least. This CAN, but does not necessarily, lead to sexual attraction, which is not the same as sexual tension.
That being said, there is also our intellectual abilities to compartmentalize, which can help to keep us from acting upon that tension or attraction. We can CHOOSE to be non-sexual. But the attraction/tension is still there, and if one of the friends becomes romantically involved with someone else it can create strains in the other friend. Jealousy is also a part of our genetic makeup, after all.