I agree that the OT has problems.
But nowdays, religion does not teach that. Agree with that?
No.
According to Jesus, all the laws of the old testament still stand. He was quite specific about that in a number of locations.
"For truly, I say to you, till heaven and earth pass away, not an iota, not a dot, will pass the law until all is accomplished. Whoever then relaxes one of the least of these commandments and teaches men so, shall be called least in the kingdom of heaven; but he who does them and teaches them shall be called great in the kingdom of heaven.” (Matthew 5:18-19 RSV)
"It is easier for Heaven and Earth to pass away than for the smallest part of the letter of the law to become invalid." (Luke 16:17 NAB)
"Do not think that I have come to abolish the law or the prophets. I have come not to abolish but to fulfill. Amen, I say to you, until heaven and
earth pass away, not the smallest part or the smallest part of a letter will pass from the law, until all things have taken place." (Matthew 5:17 NAB)
In addition, Jesus also condoned slavery. (Do you think slavery moral?)
Ephesians 6:5 Slaves, obey your earthly masters with deep respect and fear. Serve them sincerely as you would serve Christ.
1 Timothy 6:1 Let as many servants as are under the yoke count their own masters worthy of all honour, that the name of God and his doctrine be not blasphemed.
1 Timothy 6:2 And they that have believing masters, let them not despise them, because they are brethren; but rather do them service, because they are faithful and beloved, partakers of the benefit. These things teach and exhort.
Peter 2:18 Servants, be subject to your masters with all fear; not only to the good and gentle, but also to the froward.
Titus 2:9 Exhort servants to be obedient unto their own masters, and to please them well in all things; not answering again;
Luke 12:45 But and if that servant say in his heart, My lord delayeth his coming; and shall begin to beat the menservants and maidens, and to eat and drink, and to be drunken;
Luke 12:46 The lord of that servant will come in a day when he looketh not for him, and at an hour when he is not aware, and will cut him in sunder, and will appoint him his portion with the unbelievers.
Luke 12:47 And that servant, which knew his lord's will, and prepared not himself, neither did according to his will, shall be beaten with many stripes.
Jesus also tells everyone to give away everything, reject their own family, etc. (Do I need to quote chapter and verse again? I can do it all day long)
That you and most other people reject a great deal of the 'morality of the bible', keeping just the 'good stuff' indicates rather strongly that we don't get morality from religion, but from our instincts, logic, etc. (by what other facility could anyone sort the bible into its good and bad bits, if not one's own moral compass?)
How do you know that slavery, among many other moral outrages contained in the bible, is wrong? In Jesus's own words, we are still to stone to death children who sass their parents, murder your wife and dump he on her parents step, if you find her not virginal on your wedding night. (the only conclusion to be drawn from not one iota of old law passing)