The reason for this is to save resources on the PC or Server that MS SQL Express is installed on, as usually these PCs or Servers have minimal resources.
To check whether Auto_Close is ON or OFF for your database.
SELECT DATABASEPROPERTYEX('YourDatabaseName', 'IsAutoCLose');
To disable AUTO_CLOSE on your database you can run the following T-SQL command on the database:
Alter Database YourDatabaseName Set Auto_Close ON