Why is the pitot tube located near the nose?
There are several reasons to have the pressure sensors in the front section of the fuselage.

The further aft the more turbulent the airflow is and the thicker the boundary layer caused by the fuselage. This would cause strong fluctuations of the measured pressure and the reading could be inaccurate. Far forward the boundary layer is the thinnest because the boundary layer thickness grows with the distance traveled along the surface.
The position on the nose should be less sensitive to angle of attack and side slip angle changes. Having the sensors on the side of the fuselage would cause significant changes in pressure measurements depending on the aircraft attitude relative to the incoming air.
The pressure sensor in the nose is close to the cockpit instrumentation and avionics computers. Pressure tubes can be short and cannot be disconnected by mechanical forces that easily.
There is no ground equipment moving close to them. Having them further aft could easily damage the sensors during baggage or passenger loading/unloading.
During winter months airplanes have to be sprayed with de-icing fluids. Up front they are not flooded by these substances and are spaced far away from the affected areas.

Some aircraft have the sensors located on the wings. The Cessna 172 pitot tube is one example that comes to mind.