Good to know!
It’s because the UPC modem doesn’t bother sending a country code, so you randomly get one from a neighbour. In my case, today, it’s showing “DE” for Germany. Then, if the UPC modem decides to change/pick a channel number that’s not in the legal range for Germany, the Mac will refuse to connect.
This can be a big problem for those who, or whose neighbours, own a WiFi router from Asia, especially China, as they really block a lot of channels which the UPC modem will typically pick.
I believe this problem would be permanently fixed if the UPC modem/router actually sent out a country code, but I’m no expert. Anyway, the workaround is to manually pick a channel in the config and disable the feature that could cause it to change.