Another area where JNDI helps:
It abstracts the lookup of resources. Normally the JNDI configuration is stored in an XML file on the application server, but it need not be. The configuration might for example be stored on an LDAP server, to make it easier to maintain centrally.
If the applications you run use JNDI to lookup what they need, you can switch from configuration files to using an LDAP server without modifying the applications. If each applications expects a properties file with a hardcoded name, you are out of luck. Imagine an enterprise with dozens of applications in production - changing them all would be a significant problem.
In other words, JNDI mainly shines for complex deployment scenarios, like:
- many application servers (possibly clustered)
- many different applications
- centralized configuration
- different server stages (test, production)
So it might seem overkill at first, but is very useful in theses scenarios. Of course, some benefits apply even for small deployments, such as the standardized configuration of DB connections.