Maybe it's a more theological question but the reason for it must be historically grown.
by "deny sexuality" I mean that they have rules like "no sex before marriage" or the islamic headscarf to hide a womans hair as some kind of "sex symbol".
This is no critic of this religions. I'm just curious
The concept of modesty exists in all human societies, even in the most liberal ones today. It is a function of societal norms as much, if not even more, than religious rules; an Amish woman will not walk around in public in a mini-skirt, and this outfit, even without the headscarves, are considered "decent" enough for schools in Muslim-majority Malaysia.