FORESHADOWING.
Does anyone else notice that at the beginning of Thor, when they’re travelling to Jotunheim Volstagg asks Heimdall why he can’t leave the Bifrost open and Heimdall tells him to do so would destroy Jotunheim?
And then Loki does that at the end of the movie. So technically Heimdall gave Loki the idea on how to kill the Jotuns.