Some museum dioramas may feature stooped, brutish, unkempt humans living in caves—primitive, subhuman cavemen.
In fact, people throughout history have lived in caves, and some even live in caves today. This does not mean that cave-people were (or are!) in any way more primitive than modern humans. It simply means that they were people who chose to live in caves (or were forced to live in caves because of extenuating circumstances).
After the people were scattered from Babel, some may have sought temporary shelter in caves, while working on building more permanent shelters for themselves. Additionally, Lot (Genesis 19:30), David (1 Samuel 22:1–24:7), and Elijah (1 Kings 19:9–13) at one time or another called a cave their home. Obadiah hid prophets in a cave (1 Kings 18:4), and the Israelites (Judges 6:2) escaped the Midianites by living in caves. Also, the Essenes, a Jewish sect living shortly before and after the time of Christ, lived and had libraries in caves. The discovered copies of many of their scrolls of Scripture and other Jewish literature are now known as the Dead Sea Scrolls.
For more information, see www.answersingenesis.org/human-evolution/cavemen/the-amazing-cave-people-of-malta/.