The top resistor is to pull the Gate of the P-channel MOSFET High to turn it off.
To turn the P-channel MOSFET on, the gate must be pulled low; that's what the NPN transistor is for.
The Arduino High output puts current into the NPN base to turn it on. When it is on, the collector goes from 12V down to ~0.7V, and that low voltage turns on the p-channel mosfet.
So there are two technologies at play - the MOSFET, which only needs voltage level changes at the Gate to turn it off & on, and the NPN, which is BJT, which needs current, and lack of current into the base to turn it on & off.
Do some reading at wikipedia of MSOFET and BJT, it is quite interesting.
The NPN could also be directly replaced with an N-channel MOSFET.