Why is the fuel pump in the startup procedure for a Cessna 172?
Many 172s are fuel injected.

I've flown both carbureted and injected 172s.

On a carbureted model, you prime by pumping the primer between 2 and 5 times.

On a fuel injected model, you prime by running the fuel pump for about 3 to 5 seconds with the mixture open.

As for why you do that, the short answer is because the POH says so.
The more precise answer is that gravity feed alone is not enough to push fuel through the fuel injectors (which are very tiny little holes in the cylinders)