“Where does the Bible say anything like that?”
For one, I’m not going to play the game of “Bible Only.”
That’s the invention of men in the 1600’s.
The Church has a long tradition of hermits, desert fathers, anchorites and anchoresses. In fact, the Hebrew Testament does too.
Some anecdotal “evidence” of what you saw on tv is just that, anecdotal. I have first hand experience with nuns cloistered and not.
If you are interested in the beginnings of the religious life, this link is an excellent description of the nuns, their beginnings if you read St. Justin and St. Paul.
http://www.newadvent.org/cathen/11164a.htm