I think there are two things that lead people to think like that
1) Modesty/nudity-taboo culture. I can only speak to the US-American perspective here, but I'd guess it's similar in any culture where nudity is taboo. Because you're taught to keep your body covered (and women's bodies moreso than men's) and that you shouldn't--a "should" imbued with moral weight here--see the naked bodies of others unless it's a locker room or you're about to have sex. This creates a kind of mystique around bodies, especially of another gender. With same gender friends, you probably see their bodies occassionally in locker rooms, or just changing casually, maybe skinny dipping, etc... which removes much of the mystique. But in these cultures it's unusual to see a different gender friend nude, so there is some mystery. If there is any sexual attraction that adds to the mystery and creates "tension". In cultures with less modesty or less taboo around nudity, you just see your friends of any gender naked and there is no mystery, and no tension around bodies.
2) Abstinence-only sex education & the sanctity of sex. In cultures where sex is seen as sacred, something you should only do with one person and for procreation, there is also an extent to which sexual attraction itself is shamed. I find that a lot of straight people (especially those without queer friends) feel ashamed if they find their friends attractive, and are unable to continue a platonic friendship if they feel any attraction at all. This is not at all how queer friend groups operate, it's expected you might be attracted to your friends but that doesn't mean you need to have sex or have "tension". The idea that you can be attracted to someone and just not make a problem out of it is very controversial in straight culture sometimes
People who believe men and women can't be friends are also in general only thinking about straight cis people. This idea is just absent from queer culture, and also (anecdotally) from straight cis people with many queer friends
This is it right here. Bodies are innately sexual always and sexuality is sacred/naughty/bad/too intense to ignore/whatever. Sex may be used to sell us things, but it doesn’t mean we aren’t a repressed society. Hence why having any relationship with a woman is stated as a problem why others are completely confused who didn’t grow up with this repressed idea of sexuality.
People in general rightfully believe that sexual passion is a powerful force that can be creative or destructive. Just like electricity it must be approached with caution. Queer or whatever culture works because a few bare wires won't start a fire so long as all other wires are isolated, but if the rest of society adopts this mindset, a major fire will be a matter of time.
1) Modesty/nudity-taboo culture. I can only speak to the US-American perspective here, but I'd guess it's similar in any culture where nudity is taboo. Because you're taught to keep your body covered (and women's bodies moreso than men's) and that you shouldn't--a "should" imbued with moral weight here--see the naked bodies of others unless it's a locker room or you're about to have sex. This creates a kind of mystique around bodies, especially of another gender. With same gender friends, you probably see their bodies occassionally in locker rooms, or just changing casually, maybe skinny dipping, etc... which removes much of the mystique. But in these cultures it's unusual to see a different gender friend nude, so there is some mystery. If there is any sexual attraction that adds to the mystery and creates "tension". In cultures with less modesty or less taboo around nudity, you just see your friends of any gender naked and there is no mystery, and no tension around bodies.
2) Abstinence-only sex education & the sanctity of sex. In cultures where sex is seen as sacred, something you should only do with one person and for procreation, there is also an extent to which sexual attraction itself is shamed. I find that a lot of straight people (especially those without queer friends) feel ashamed if they find their friends attractive, and are unable to continue a platonic friendship if they feel any attraction at all. This is not at all how queer friend groups operate, it's expected you might be attracted to your friends but that doesn't mean you need to have sex or have "tension". The idea that you can be attracted to someone and just not make a problem out of it is very controversial in straight culture sometimes
People who believe men and women can't be friends are also in general only thinking about straight cis people. This idea is just absent from queer culture, and also (anecdotally) from straight cis people with many queer friends