The Staff of Ra had to be placed in a specific peghole to show the location. The dagger outline is rather more silly as Rey just happens to be standing on the exact random spot where it lines up!(at least some sort of plinth on the cliff top for the dagger to slot into…)
In truth it probably would have been better if the dagger had been the key to open Palpatine’s vault.