My understanding is that the 2% has to be paid by non-resident owners when the property is sold. (ie. owns a vacation home in Vail and lives in San Diego and is a San Diego resident.)
It used to be where non-residents buy up properties, sell them at huge profits and the state does not collect a dime, hence the change a few years ago.
As to the 2 out of 5 is a federal, IRS issue.