There are no laws that make any SSID names illegal per se. There are other laws that make certain actions illegal, like "praising terrorism" apparently. That's all the law that's needed; there are no specific laws to make all the gazillions of possible ways to "praise terrorism", and they are not needed.
If you are worried that a randomly generated SSID would put you into jail, you should worry more that anything randomly generated could put you into jail. If you send out a design with "Lorem ipsum..." replaced with random text, that would be the same situation.
In reality, the crime is "praising terrorism". If you can demonstrate that you have 100 randomly generated SSIDs and 99 look random, then the intent is clearly not there, and you can't "praise terrorism" without intent. In addition, there's the question of odds. You may have carefully changed your code to avoid anything looking illegal. Then you step out of the door of your office. A lightning strikes but by coincidence you stumbled and were out of the way; then an elephant escaped from the zoo runs just over the spot where you've just been, and finally a meteor strikes and game over. What's more likely to happen?