The vents are to relieve pressure so that you dont break any windows from closing doors. When you close your door, theres a lot of pressure that gets thrust inward, its pretty easy to see it happen when you have a softtop. In the later TJ models, the pressure is relieved from the tailgate vent, that is why some later hardtops wont have vents on them.
EDIT: Actually I dont think you can built enough pressure to break the glass from closing the door, but it basically there to help you close the door easier when the windows are up.
TLDR: Vents are so your jeep interior can breath