I can not answer the question why this happened but links:
directive is the very old deprecated way to connect multiple services (which happens automatically with the *-default network today. I’m not sure it also magically added an alias to service.. and likely some Docker upgrade finally completely removed the functionality..
for the reference if you want to create an DNS alias for the service in docker-compose just use “aliases”: