Yes sauerkraut does go bad if it's not refrigerated.
When you leave sauerkraut out in the open at room temperature for longer than a few hours the sauerkraut could start growing bad bacteria and mold which could make you sick.
If you plan to use the sauerkraut within a few hours then leaving the sauerkraut out at room temperature is okay but just be sure to keep it sealed until you use it.
But if you're not gonna use the sauerkraut within a few hours it should be kept sealed and placed in the refrigerator to keep bacteria from growing in the sauerkraut.
If you keep the sauerkraut sealed and in the refrigerator the sauerkraut can last from 6 to 7 months and sometimes longer.