Now the question of why we became "ashamed" of our nakedness is a whole other issue.
Same reason - it's cold outside. If clothes are necessary for survival, then societies evolve to make sure that their members wear the requisite clothing.
The specifics are, of course, cultural. Obviously, not every culture agrees what one should be "ashamed" of not covering up.