God did invent sex.
God also gave a book of rules that govern sex.
When you do not obey the rules nothing good happens.
If you don't believe that, try to assemble a child's toy without reading the instructions.
It never turns out the way it should. Something is always missing.