He also commanded him specifically to never take foreign wives and Solomon did not take that seriously. Mostly because having foreign wives would split his allegiances. Marry and reproduce is commanded but with another person, not as many as possible.