The *.ldb file is the file that Access uses to store the locking information. Meaning: who has access to what records, so what records can't be changed by others etc. It is because of this file, you need write access to the directory the database is stored in.
It is automatically deleted once no user is connected to the database. It gets recreated automatically by Access, so there is no need to safe it or copy it along with the database itself.
So, yes, you are partially right about the fact that as long there is an open connection, the file will exist, but those connections timeout and also get closed automatically in case you forgot to close them somewhere in the code. Of course forgetting to close the connection is not good, because it is better to release all connections when no longer needed.