Do you remember Office Web Apps in SharePoint 2013 , Microsoft changed its name to Office Online Server but it doesn’t mean this is not on premises.
As Office web apps , You can View and Create/Edit (need a license) the following documents types:
This product is not only for SharePoint , you can use it with other Microsoft products like exchange , Skype , .. and that’s why it needs a separate server.
Also it provides your search preview feature and mandatory for SharePoint 2016 BI.
For more information https://blogs.office.com/2016/05/04/office-online-server-now-available/