a lot of US unis are private, or have minimal government funding. so they need to make their money through student fees. often, the public unis are funded by the state and not the national government, and so will charge less to in state residents (who pay the taxes that fund the school) but nearly (not quite) the same as private schools to out of state residents.... which would mean anyone international too.
at least, that's always been my understanding of why it costs so much more to study here than in canada or the uk, or really anywhere.
i dunno, a part of me thinks it it should be a right for anyone who does well enough in school to be able to go to uni... but so many people here cant afford it, or go into HUGE amounts of debt. and yet we say that we value education for all of our citizens in this country... hmmm.