Jews Betraying God in Tanach
When I learn Tanach, more specifically Navi, I notice a that common and reoccurring theme is that the Jews will betray Gd, usually by avoda zara (idolatry) or lack of Tzedaka and Mishpat (charity and justice-keeping), and then a Navi will tell them over the message from Gd that they have to do Teshuvah or they will be destroyed, and it’s up to them to listen.
I’ve always been curious, how is it that Jews back then can stop obeying Gd and turn to idol worship, when back then, Gd performed more obvious miracles, so they knew He exists?
It can’t be that they deny Gd’s existence, when it’s so much more obvious that He’s there. How were they not afraid or ashamed of turning away from Him?