I'm not a "Rah-Rah" sports type of guy so these things always came off silly and strange to me, but as stated, they got me out of class and often outside and you just goof off with buddies until the event starts. For a high school kid, that's a win.
In any case I think the mandatory attendance thing is all about stuff like staff resources and liability, something that as a teen wouldn't have come to me. But yeah, you could tell kids that if they don't want to attend then they get a study hall or the like but then you have to have staff there to look over them. Doesn't sound like much but corraling all the kids at the rally takes a max effort to begin with. And no parent is going to accept something, even a minor thing happening to their child and finding out a contributing factor was that little Billy was in the library rather than the rally and when he went into a diabetic shock the school nurse was at the rally in case anything happened there. Better to just have as many students together as possible and centralize all your staff resources.