Note the difference between “doing evil in the sight of the Lord” and “doing that which was right in the sight of the Lord.”
Here is some useful reading. What you make of it?
1 Kings 14:21 And Rehoboam the son of Solomon reigned in Judah. Rehoboam was forty and one years old when he began to reign, and he reigned seventeen years in Jerusalem, the city which the Lord did choose out of all the tribes of Israel, to put his name there. And his mother’s name was Naamah an Ammonitess.
22 And Judah did evil in the sight of the Lord, and they provoked him to jealousy with their sins which they had committed, above all that their fathers had done.
23 For they also built them high places, and images, and groves, on every high hill, and under every green tree.
24 And there were also sodomites in the land: and they did according to all the abominations of the nations which the Lord cast out before the children of Israel.
1 Kings 15:9 And in the twentieth year of Jeroboam king of Israel reigned Asa over Judah.
10 And forty and one years reigned he in Jerusalem. And his mother’s name was Maachah, the daughter of Abishalom.
11 And Asa did that which was right in the eyes of the Lord, as did David his father.
12 And he took away the sodomites out of the land, and removed all the idols that his fathers had made.
13 And also Maachah his mother, even her he removed from being queen, because she had made an idol in a grove; and Asa destroyed her idol, and burnt it by the brook Kidron.
14 But the high places were not removed: nevertheless Asa’s heart was perfect with the Lord all his days.