I am just starting out with Angular. Reading the example of a service in the Google documentation, I just wonder why you would choose to use a service rather keeping the var
Apart from the benefits listed above, it also helps you divide your application structure into independent components, which make it more understandable and testable as well.
Imagine having to test similar functionality at multiple places rather than having it defined/debugged at a central location and used elsewhere (multiple times).