As @sh0ber pointed out you are being confused be the way Chrome console works. Anyway, to set the heading
variable you should use callback:
app.controller('ShowAccountController', function($scope, $rootScope, $state, $stateParams, Account) {
$scope.account = Account.get({ id: $stateParams.id }, function(account){
$rootScope.heading = account.name;
});
});