Why is the APU located in the tail for almost all commercial aircraft?
Dead space... Not much room in the tail to put other stuff, and it fits. Plus it has a nice empty space just outside for the exhaust pipe to exit without the hot gasses hitting anything.

Put the APU in the nose and you need a long pipe somewhere to get rid of the exhaust. More weight, more space, etc.
Put it in the wing and you're looking at uneven weight distribution (you want it at or near the centerline).
Leaves the tail area as a logical place, and there just happens to be space there as well in most aircraft.