While agreeing to the answer of one member (@sv.), I am providing my answer below.
The Khajuraho temples feature a variety of artwork, of which 10% is sexual or erotic art outside and inside the temples.
We have to remember that Sex was never decried in the Veda or subsequent literature. Sex is but Natural to all living beings. And, to gratify sexual impulse is a part of progress in attaining heights of SPIRITUALITY.
So depiction of sculptures relating to sex, is to indicate this aspect only.
This is a GENERAL Rule.
Exceptions can be found in every generation, when a few people in view of their lack of interest in this subject, embraced SPIRITUAL practices right from their childhood, and attained heights in SPIRITUALITY.
Jada Bharata from the literature, Sri Ramakrishna Paramahamsa, Sri Ramana Maharshi, etc, are a few people that fall into the exception cases.
In Rig Veda I.179 (P.100), Lopamudra teaches Sage Agasthya the importance of fulfilling sexual desires.
Lopāmudrā teaches it to her husband who was inclined to asceticism.
She says that even those ancients didn't find their end destination
who, without their worldly responsibilities, just toiled and spoke the
They had to marry, they had to speak their experience, they had to
live their life to find the meaning and to achieve the success.
Lopāmudrā says to her ascetically inclined husband that this way of
invoking hardship on her by staying away from her doesn't make Agastya
complete. He has to fulfill his life before thinking of achieving
success in spiritual journey. Passion is responsible for synthesis and
guilt is responsible for deconstruction. One who has understood the
way to deconstruct and construct achieve the right plane of existence.
Agastya, on hearing the wise words of his wife, rebuilds the kāma in
him and returns to his life, his duties.