This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
The container vendor may implement naming service using LDAP,RMI,COS or any other way.
Each naming service has its own characteristics with respect to what kind of objects it is capable of storing, whether it is persistent or transient, etc. JNDI itself does not dictate those characteristics. It merely provides an abstraction for accessing the naming service in a way that protects your code from the gory details of the specific naming service implementation as much as possible.
JNDI is not the naming service itself. It's just an API you use to access a naming service. Just like JDBC is not a database. It's just an API you use to access a database. Someone needs to make a conscious decision to expose a particular naming service, LDAP, CosNaming, etc. via JNDI.
This decision would typically be made by the implementors of the naming service, but could be done by a 3rd party as well.
So basically its for vendors usage and their comfort.