I don't believe so
This is more of a theological question than medical, but let me try.
Monogamy is certainly a good way to prevent STDs, but I don't believe God created them to punish us. Quite the opposite! Just as God did not create car crashes to make us obey speed limits, godly laws (against adultery/incest etc benefit people regardless of whether they believe in God or not because they are for our safety.