Why is the government "bailing out" these financial institutions rather than helping homeowners in foreclosure? - government help for homeowners

Why can not / does not the government, homeowners who are in foreclosure help? but now the help / "rescue" of financial institutions who took subprime loans and has caused the housing crisis in the first place. Can someone explain?