# Stress-energy tensor. Why this general form?

How is the stress energy tensor obtained? In most textbooks, it's simply stated as

$$T^\mu{}_\nu=(\rho+P)U^\mu U_\nu-P\delta^\mu{}_\nu$$

I can see why this makes sense for a comoving observer at rest wrt. the perfect fluid. But I don't understand how the general case is arrived at. Would someone kindly explain?