It’s not illegal, it’s just ‘against flag code’ which is not and can not be law.
Funny enough, burning the flag is the proper way to dispose of damaged flags, according to flag code. Those damned anarchists and their proper flag disposal
As I said in another comment, that’s why I put illegal in quotation marks. I honestly couldn’t come up with the right term, so I just went for the sarcastic air quotes instead.
As for the flag burning, you and I are on the exact same wavelength there. I commented on that in my other comment, too!