Let’s say your company built a simple product management system years ago when Windows Desktop applications were the only mainstream user-interfaces/front-ends. At that time, all operations to support the product management – AddProduct(), UpdateProduct(), DeleteProduct(), GetProductList(), GetProductInventory() etc. – were directly implemented in that desktop application code. Later, when N-Tier architecture became popular, these operations were separated into business layer and data access layer, but they were still compiled and deployed together when there was a change in any layer.
Later when web applications became popular, we could re-use those business layer and data access layers in both desktop and web applications without duplicating any code. But any change required re-building and re-deploying both applications. Next, when mobile applications become popular, it was not easy to re-use the same business and data access layers as-is, because the mobile apps needed to be super-thin and super-fast. Plus, the languages used to build mobile apps may be different than those used to build the business and data access layers.
The best way to re-factor those operations to enable easy integration across different front-ends and operating systems is to separate out the business and data access layers from the tight coupling of front-ends to their own API projects, and expose those operations as API endpoints. This way, all front-end applications can call those API endpoints in a secured manner, without having to worry about the underlying API implementation.