As with anything, this Bible story has some unclear origins:
https://en.wikipedia.org/wiki/Judgment_of_Solomon
I have also read an assertion that it was a political parable, spread by Solomon himself. The two women represent Adonijah (the "real mother", the true successor to the throne by birthright) and Solomon (the false mother, the false successor to the throne). The baby represented the kingom of Israel.
Basically, the story states that Solomon would be willing to split the kingdom in two, in order to keep the throne. And that is why, when the nation heard the story, they "Trembled" at hearing it.
And of course, when Solly died, and his son took over, the kingdom DID split up.
This entire Saul/David/Solomon story reads like the frickin' Godfather saga, doesn't it!?