It does do that, but the primary purpose is to push investment. To protect money from inflation you have to put it to work. Wealth is a verb, not a noun.
It also erodes real salaries, which is a useful way to adjust salaries in a world with sticky prices (where nominal contracts are not easily adjusted).
No that's not how it works in the typical case. Lenders set their interest rates based on expected future inflation rates over the term of the loan. Debts only really get eroded when interest rates are fixed and actual inflation greatly outpaces expected inflation. Like in the hyper inflation that occurred in Zimbabwe, Venezuela, Serbia, etc.
No, it's intended to erode debt. Inflation is effectively a transfer of wealth from creditor to debtor.