Why is national debt bad if the central bank can keep buying bonds? When I read about national debt, it's usually about how debt is bad because with too much debt, debtors would demand higher interest rates. Eventually the government can't pay the interest, defaults, and the economy collapses.

However not discussed is why the central bank can't just step in and keep lending money to the government. It's not like the central back doesn't already do that - according to this article, 27.6% of the US national debt is currently to another arm of the government. But if the central bank can just keep buying government bonds, the government can also force the interest rate on its debt as low as it desires (just get the central bank to buy more bonds), not to mention deficit spend to its heart's content. And if the government is able to do that, then national debt isn't a problem at all!

It seems to me that there's only a problem if 1) the country doesn't have a central bank or 2) you're using another country's currency (e.g. for members of the Eurozone). Am I missing something?
Yes.

The central bank (say the Fed in U.S.) can purchase bonds, but notice:


The Fed is not going purchase t-bonds and t-bills directly from the Treasury. It will only purchase or sell bonds in the market. ("Open market purchase" or "open market sell.")
Open market purchase is not only the buying of bonds, but also the creation of money. (You sell bonds to the Fed, and the Fed will pay you.) Increase in money supply means inflation. Obviously, the Fed can't buy too much bonds, or the U.S. will have to deal with disastrous hyperinflation.
Most central banks have some degree of independence in determining what to do. The Fed won't purchase more than they want, and the government is not able to force them.