Why David Killed Goliath

Do you know why David killed Goliath and then decapitated him?
He wanted to get a-head!