Like David, Solomon had a weakness. Although the chapter talks about his many marriages, his weakness was more related to wealth and power. Marriages between royal families were a way to create alliances between neighboring nations. Solomon’s fame made him an attractive alliance partner. In order to be hospitable to these royal wives, he needed to build places for them to worship their native gods, but he took it a step further by worshiping these gods himself. God had not only forbidden Israelites from marrying worshipers of other gods (Exodus 34:12-16), but had also forbidden their kings to have many wives (Deuteronomy 17:17). Solomon really knew how to break a rule in big way!
According to 2 Corinthians 6:14, we are also not supposed to marry those who have not trusted Jesus either, but it’s easy to justify things we want to do when the heart gets involved. However, one act of disobedience, even with the best of intentions, leads to more disobedience. For Solomon, it led to 1000 wives and the worship of many gods.