The second one is used for protection against minification mangling, because when you mangle the first version, you get let's say
var b = a.module('myApp', []);
b.controller('myController', function(a, []) {
.....
// if you use $scope here it will get mangled and may not be what you expect, this potentially breaks the code
});
Whereas if you use the second one you protect your variables so that angular knows how you assign injected dependencies and your code does not break anymore woohoo!