I would recommend not going directly to the DB. Openfire caches a lot of information for performance reasons so making DB changes means that you might need to restart the server. In the case of MUC rooms, the MUC service does not poll for DB changes. It just loads persistent rooms from the DB when starting up and, as you noticed, also when someone tries to join a room. For performance reasons, Openfire does not load all persistent rooms in memory unless they have been recently used. However, since unloaded rooms still exist the MUC service will check in the DB if the room exists even if its not in memory. That is the reason why joining a room that only exists in the DB results in the room being loaded.
Having said all that, I would recommend writing a plugin that will create rooms by using the API or use Smack to simulate a client creating rooms. If you still need to go directly to the DB then you have two options. Option 1: Restart the server or option 2: load the room from a client for each new room created in the DB.