The doctrine exists for two reasons, and both explain features that otherwise look arbitrary. The first is that a person should not be paid twice for one loss. Without subrogation, someone whose car was destroyed by a negligent driver could collect from their own insurer and then collect the same loss again from the driver. The second is that the cost should end up with the party who caused it rather than being absorbed by everyone who pays premiums into the same pool. Those two purposes are why the right is capped at what the insurer actually paid, and why it exists at all in the absence of any agreement with the wrongdoer.
The policyholder carries a duty not to damage the right, and it is the part most often broken accidentally. The federal flood policy states it directly: "After the loss, you may not give up our right to recover this money or do anything that would prevent us from recovering it." Private policies carry equivalent language. What that rules out is signing a release, accepting a settlement, or agreeing to "handle it between ourselves" with the responsible party after a loss the insurer has paid or may pay. A neighbor whose contractor flooded a kitchen, offered a few thousand dollars and a signature, has just extinguished the claim the insurer would have pursued, and can find the coverage compromised as a result. Before a loss the picture is different: contracts, particularly commercial leases and construction agreements, frequently contain a waiver of subrogation in which each side agrees in advance that its insurer will not pursue the other. That is a term the insurer prices, which is precisely why it has to be agreed in advance rather than improvised afterwards.
Who gets paid first out of a partial recovery is a real and consequential split, and the contract does not always win. The federal flood policy takes the strongest contractual position available: "If you make any claim against any person who caused your loss and recover any money, you must pay us back first before you may keep any of that money." Read literally, a policyholder who recovers less than the full loss hands all of it to the insurer and keeps none of their own uninsured shortfall.
State law can displace that. Ohio, for example, provides by statute that "notwithstanding any contract or statutory provision to the contrary", the rights of a subrogee asserting a contractual, statutory or common law subrogation claim in a personal injury action are subject to a proportionate reduction: where less than the full value of the claim is recovered, whether because of comparative negligence or "by reason of the collectability of the full value of the claim for injury, death, or loss to person resulting from limited liability insurance or any other cause", the subrogee's claim "shall be diminished in the same proportion as the injured party's interest is diminished." The statute reaches insurers, self-funded health plans, health care provider-sponsored organizations, and any person or entity claiming subrogation by contract or common law, and it gives either side a route to court if the distribution is disputed. Other states approach the same problem through a made-whole rule, under which the insured is compensated in full before the subrogee takes anything, and some leave the contract to govern. Whether a state rule of that kind reaches a particular plan is a further legal question that turns on how the plan is funded. The practical point is that "the policy says they get paid first" is the beginning of the analysis rather than the end of it.
Insurance is the largest application of the doctrine, not the only one. Federal law makes the United States a subrogee for Medicare: 42 U.S.C. section 1395y(b)(2)(B)(iv) provides that "the United States shall be subrogated (to the extent of payment made under this subchapter for such an item or service) to any right under this subsection of an individual or any other entity to payment with respect to such item or service under a primary plan", and the adjacent provision allows the United States to collect double damages from an entity that should have paid. Employer health plans and workers' compensation carriers assert the same kind of claim against an injury settlement, which is why a personal injury recovery is often smaller in the claimant's hands than the headline number. A mortgagee has its own version: the federal flood policy provides that where the insurer pays the mortgagee and denies payment to the borrower, "we are subrogated to all the rights of the mortgagee granted under the mortgage on the property." And it runs outside insurance entirely. Under the Uniform Commercial Code, a bank that pays a check over a valid stop-payment order is subrogated to the rights of the parties to the underlying transaction, so that a customer who genuinely owed the money does not get it back from the bank; the stop payment page carries that mechanism in full.
On the auto version, one detail is worth flagging and belongs elsewhere. When a collision insurer pays its own policyholder and then recovers from the at-fault driver, what happens to the policyholder's deductible depends on how much is recovered and on the policy's own language. That is covered on the collision coverage page, which owns it.