From Darwins point of view, klingy children slept besides their parents, were not eaten by sabre tooth tigers, and passed on the klingy gene. Babies that slept alone were eaten by Sabre tooth tigers, and did not pass their “can sleep in isolation” gene across.
So why fight nature, accept it as part of life. Sleeping together bonds parents and children.