The ancient Romans knew a lot about this when they ate vinegar fish with caramel apples and other horrors ... although it was considered common for them to "mix unmixed" but it is better to look at the Wikipedia article "cuisine of ancient Rome"
It's all a matter of taste and, in part, tradition. Look at the cuisine of Indochina and China. There, mixing is the basis of the basics.
Let's not forget about personal preferences (after all, taste preferences change throughout life).
I really like experiments, and for example, garlic ice cream in a restaurant " Balthasar "(Tallinn) has become one of my favorite dishes, along with steak in orange sauce (homemade).
What can you say about a delicious milk herring (or sprat) soup with lightly salted cucumber? Wonderful ... Check out morenori.ru
In the year 1995-96, I once tasted ice cream with salted nuts. This taste blew my mind. Since then, I have not hesitated to mix sweet and salty.
We are omnivores and therefore I think that there is nothing harmful. The maximum will be diarrhea. Well, and also a matter of taste, of course, which is instilled in us in childhood.
Not dangerous as far as I know. As they say, everything will mix anyway.
I heard that we eat sweet / salty separately only because it was accepted by someone.
I was served with salted meat or fish sweet sauce. And they added sea salt to the dessert.