I wouldn't consider music an "alternative to boredom" as its foremost characteristic or as a last resort to boredom. It's just a fun activity. Just like smoking marijuana is. It's too much of a mischaracterization of music, or pot, or any other leisure activity.
The effect of smoking pot lasts longer than the action of smoking pot. The effect of listening to music often is limited to the action of listening to music.
Pot affects people over time. So you might smoke a joint then be quite content being in the world doing whatever. If you didn't smoke the joint and did the same whatever things you would feel bored.
You generally don't feel bored and are ok with it on pot, you feel ok doing the same activities you would feel bored doing if you were not high.
I hope that improves the understanding.
But when you finished the joint, you will still have to do something. And after the active part of smoking is done, the "beeing high makes you more likely be okay with beeing bored" still applies.
And I can promise you that I am not ignorant when talking about marijuana, and neither am I opposed to people smoking it for their enjoyment.