"My solution? Make attendance voluntary by abolishing truancy laws."
I agree with you in theory, but in practice this doesn't seem to work out so well. Look, for example, at the chapter in Dan Ariely's book Predictably Irrational: about prebinding commitments and universities. In one experiment, he (and his co-authors) took a group of similar classes and divided them in threes: one group was told that it could turn in three papers whenever each member wanted; another group was told it could pick due dates; and the third group was given conventional due dates spaced over the course of the semester. The last group did the best, gradwise; the second did reasonably well too, since most students picked conventional due dates; and the first did by far the worst.
The lesson: people are often bad at committing to things.
I've observed the same effect teaching freshman composition at the University of Arizona. I used to conduct many more experiments by ranging the number of mandatory drafts: sometimes I'd require as few as one, and sometimes as many as five. The more drafts, the better papers tended to be. Even when I only required one, I would tell students they should do at least four to five on their own, with editing from other students, the writing center, etc. Few did. They (mostly) got bad grades and then resented me for it. Solution: require more drafts.
EDITED TO ADD: I would also say that it's relatively easy to advocate no truancy laws on Hacker News (and don't such laws only apply up to 16?); if you were actually a school principal or district superintendent who did, you would probably be fired or voted out of office if such a policy were implemented and you or your community had to face the consequences of it.