OK so, before you answer, here is something to think about.

There are two ways in which energy is transferred from one thing to another.

1) Heat energy can is transferred when there is a temperature difference.

2) A force can do work.

Now there is very little temperature difference ebtween the air and the shuttle as it approaches rentry so energy loss by heat transfer will be small.

So we are left with work.

Work is done when a force moves its point of application. Work = force times distance.

Well the shuttle is travelling very fast and it moves a long way so even a small force will result in a large transfer of energy.

The forces of friction on the shuttle and the atmosphere are equal and opposite so the work done will be the same on each.

Now the atmosphere, although thin, is enormous compared to the shuttle.

So the heating effect of the friction will be spread out over a huge mass of air, but concentrated in the much much smaller mass of the shuttle.

So the temperature of the shuttle rises more than that of the atmosphere.

(This is the same as saying that equal quantities of heat make a kettle hotter than a swimming pool.)

Now consider the impact effect of the shutle on the air. The work done is P x change in volume.

But the change in volume of the enormous atmousphere is negligable so the compression work done is small.

OK so the same amount of work is done on both the atmosphere and the shuttle.

But where does the energy come from to effect this work?

Is there any significant change in the atmosphere during and after passage of the shuttle?

No.

Then there is not significant change in the energy content of the atmosphere ie it does not come from there.

But the shuttle initially has large amoun.ts of both kinetic energy and (gravitational) potential energy.

As the shuttle ploughs into the atmosphere is looses height and thus potential energy is converted into kinetic energy. This at least partially replaces the kinetic energy used to perform the frictional work.

So it is an ongoing dynamic process converting potential energy to kinetic energy to frictional heat.