While I do agree that taking attendance is childish, it makes students who skip very frequently go to class.
When I was at Baylor, every single class except for the really big ones (there werent that many since its a private school) took attendance. I was so mad when i found out they did that because all my friends at UT werent forced to go to class. I am kind of glad they did that though because it got me to get to class and not miss lectures.
When i transferred to UH, i was happy to know that hardly any classes take attendance. This is where I got into the habit of skipping class a lot for any reason. Fortunately this semester I have three classes back to back and my first and last class take attendance so I have to be there, and since I cant get to school late or leave early I also go to the class I have in the middle of the other two.
By the way, my last class is in a big auditorium and we have to slide our student ID through a scanner when you walk in the room to take roll. After you miss three classes he takes 10 points off your grade for every day missed after that!
Dont make skipping class a habit, its harder to get into the habit of going to class afterwards!