In Thor: The Dark World, Thor committed treason against Odin and Asgardian law by taking Jane (and Loki) outside Asgard. Before they escaped using Loki's secret inter-realm passage, the Asgardian army was chasing them.
Heimdall told Odin about Thor’s treason, and that was part of the plan. Why? Why couldn't Thor escape silently (and Heimdall reveal his treason after the escape)?