I think we can all guess how that came about. Back in the day there was no contraception and the church was at the center of community life. Imagine the inconvenience and heartbreak to everyone involved from unwanted pregnancies! Especially those from teenagers, who I'm sure were pressured into suddenly abandoning their own ambitions to become unwitting parents. Pre birth control of course church leaders would council people to simply say no to pre-marital sex. Sure it'd be difficult for some, but I'm sure avoiding any unwanted pregnancies was worth it for everyone involved, and better for the community at large.
Fast forward a few centuries and that (very practical) advice has become 'word of god' moralistic. Now with modern birth control we have better ways to avoid pregnancy than abstinence. But (unsurprisingly) the church's practical advice hasn't caught up with modern technology.
Not all of them. Buddhism, for example, disagrees with several abrahamic religious conclusions on moral issues. Hinduism, I believe, has a caste system which doesn't exist as a moral controversial issue in abrahamic religions but is still a controversial issue in modern times for which Hinduism is a popular religion in the region.
Abrahmix religions and Hinduism generally disagree on several moral issues, such as how many gods may be worshiped.
Pray tell - how does one determine whether a religion is "real" or not? Furthermore, are you positing that of all of these "real" religions, that they all speak to the same truth regarding humanity and it's relationship with their deity(s)?
Oh yeah, it's great how every religion came up with the exact same views on how many women you should marry, how you should treat people who worship different gods, what kind of food it's OK to eat, whether religion should be subservient to the state or vice versa, and so forth.
"Morals are a good thing" whose morals, exactly? Let me guess, yours happen to be the correct ones?