The answer is simple:
The bank wants to make as much profit as possible.
Some banks hope that the customers are uninformed and try to get the consumer to sign a high mortage rate.
Other banks will charge lower rates to get more consumers, but they will always be more expensive then FED, because lending to a citizen involves always a risk for the bank to loose the money and they will try to overcompensate for that risk.
RE: Bounty: how do mortgage rates work?