Services are separation of concerns. It is a bridge between backend/server side components and UI components. You can use service as a plug and play component. This helps in making the project more testable as you have better mocking entry points. Also using the services you can make your angular component very light as you can load only services which are required for the component by injecting them in the constructor.
The service is used to serve the data. Below are uses of services. It can be connected to database through HttpClient It can be served JSON Object . It can be used for authentication.
functions to access over the all controllers
Basically, by the help of services, you can easily separation of your code which communicates with the database. Most of the method we used in services are directly talked to the database and fetch the data. Now, this is reusable, you can inject this any of the component (if the version is greater than angular 1) and any of the controller (if the version is 1). One more important use of service is to pass data between controllers and components.