One of the stories states that during ancient times the people of the country were so much interested in the ascetic life. People choosing ascetic life were not interested in anything physical so the king of that time was worried about the number of people going ascetic.
So it is believed that this kind of art commonly misunderstood, actually encourages people to get involved and procreate. But according to historians, it was during the Malla Reign in the valley, that this Tudal art came into existence. Artisans were influenced by the erotic art in the temples in Northern India.
It might be confusing for people to understand the real reason behind these art pieces, but one thing we can all agree on about these arts is that our ancestors were more liberal about sex than we were. Maybe the conservative approach towards sexual activity might be because of the evolution in religious beliefs and practices.
The culture that we have right now is influenced hugely by Yogic science and it symbolizes sexual activity as the source of creation. So our ancestors placed this kind of art in the temples and misunderstood it so much that the people's view towards sexual acts would change to "not sinful", and take it as a part of life.
In a sense, it is a symbolic representation as well , when you look at it closely. A temple is a place where the divine is supposed to reside, and such erotic art pieces are placed on the peripheries of these religious monuments. Inside the temples are the idols and representation of the divine entity,
Likewise, our body is also regarded as a temple in this culture, and the divine entity that creates and operates our body is inside of us. And the outer part of the physical aspect of our body is nothing but created with the act of sexual means and is useful for procreating. Thus we can draw a parallel between a temple with all the erotic "pornographic" art and our human body.