It's a property of the zero knowledge proofs in question; they're called Succint Non-interactive Arguments of Knowledge because their size grows sublinearly with the size of the statement being proved. In the case of ZCash, the statement consists of proving things about the blockchain, and things are set up in such a way that the size of the proof used is 288 bytes, ALWAYS.