I thought it was pretty obvious that the whole thing was a trap set by the night king to get a dragon. Everything from the white walkers being a lone to stranding them on the small island. He just kind of nonchalantly throws the spear as soon as they show up.
UnknownSniper65's comments