Back in the days of classic ASP, application URL paths typically reflected physical file paths. This continued with ASP.NET web forms, even though the concept of custom URL routing was introduced. With ASP.NET MVC, routes were designed to cater to functionality rather than physical paths.
ASP.NET Web API continues this newer tradition, with the ability to set up custom routes from within your code. You can create routes for your application using fluent configuration in your startup code or with declarative attributes surrounded by square brackets.
To understand the purpose of having routes, let's focus on the features and benefits of routes in your application. This applies to both the ASP.NET MVC and ASP.NET Web API:
By defining routes, you can introduce predictable patterns for URL access
This gives you more control over how URLs are mapped to your controllers
Human-readable route paths are also SEO-friendly, which is great...