For big web applications or an API, even if they are build in static language you still cannot just remove an endpoint. Maybe something is calling that endpoint once a month and you don't see it, maybe even less, then you only will get to know a lot later.