Yes sauerkraut does eventually go bad.
But as long as you keep the sauerkraut refrigerated and sealed tightly the sauerkraut will last for up to 6 months in the refrigerator.
To make sauerkraut last at least 6 months or even sometimes longer the container must remain tightly sealed after every use.
If you don't seal the container of sauerkraut back up then it will go bad within a few weeks or so.
If the sauerkraut is canned sauerkraut it will last for 2 years or longer as long as the can is not leaking or rusty or swelled out.
The canned sauerkraut will last for at least 2 years and sometimes as long as 5 years.
Once you open the canned sauerkraut though it will go bad within 6 months and you should keep it sealed as well.