2 Chronicles 23:6
But let none come into the house of the LORD, save the priests, and they that minister of the Levites; they shall go in, for they are holy: but all the people shall keep the watch of the LORD. But let none come into the house of the LORD, save the priests, and they that minister of the Levites; they shall go in, for they are holy: but all the people shall keep the watch of the LORD.
Entry into the house of the LORD was restricted to the priests and the Levites who ministered there, because they were holy. All the rest of the people were to remain outside and keep the watch of the LORD. In the events surrounding his protection and crowning, the temple served as the place where the young Joash was kept safe for six years. These directions helped protect the temple and the young Joash during the revolt against Athaliah.