Why does bread soften after heating it up?
Bread is mostly flour and water.  Flour comprises a small amount of protein (gluten, which is responsible for the bread's elasticity or chewiness) and a large amount of starch (specifically two molecules called amylose and amylopectin).

The process involved in bread baking - in massively oversimplified terms - accomplishes two things:


Development of additional gluten; and
Gelatinization of the starch.


The latter - starch gelatinization - is the important part in the context of this question.  In order for the starch to gelatinize, it needs to be completely dissolved in water and then heated, which breaks up its original crystalline structure.  This process cannot be reversed... except, it sort of can.

Gelatinized starch undergoes another process called retrogradation.  At lower temperatures, these starch molecules will actually start to realign themselves back into their original crystalline structure or something similar, and during the process they will force out water.  That is why refrigerated bread often appears to have a soggy exterior, and frozen bread may develop a layer of frost on the top.

This process doesn't happen on a large scale, but it is enough to make the bread go stale.

But remember that bread is mostly water.  When you heat it again, as in the microwave, you are significantly improving the solubility of these reformed crystalline molecules, which causes them to dissolve again.  Essentially you are re-hydrating the dehydrated (stale) bread with its own water.

As you've noticed, the taste isn't great.  You can't change the fact that the bread has lost water, and a non-trivial amount of great protein and other flavour in the process.  The reheated bread is kind of limp and soggy and fragile because the protein (gluten) is what was holding it together.  But it's softer.

If you've got very stale bread, another trick you can use is to wrap it in a cloth dampened with hot water for a few minutes, or use a paper towel and microwave the whole thing for a short time.  That will do a lot more to hydrate the retrograded starches instead of relying on whatever water is left in the super stale bread.