Why did the colonial troops retreat at the Battle of Bunker Hill?

They ran out of ammunition.
They failed to build trenches and fortifications.
They were intimidated by the British army.
They knew they had no chance to win the war.