I think it tends to come up as a way of resisting something hard and unpleasant, and math tends to be the subject that most often feels hard and unpleasant to a plurality of young people. Of course most of us, if we had been freed from HS math as teenagers and left to our own devices, would not have gone off to do something really useful. We would have instead spent that time on something far more useless, like browsing HN. :-)