Solomon asked for wisdom “to govern [God’s] people, that [he] may discern between good and evil. First Kings 3:9. Nvm. He asked for wisdom for his people, not for himself. So that's why.
His mother wrote most of the second half of proverbs. Most of which go against the wisdom he wrote in the earlier passages.
One of the so many wisdom God (it's pronounced Jod, His full name is Jod He Vav He) was "marry and reproduce." Solomon took it very seriously.