Note: This is not a duplicate of this question! This is a more general question which links to what is the accepted answer to that one and clearly says it doesn't solve the problem. Additionally, whether Holdo knew about Crait while she was in command is not really relevant here, as there was only one direction of travel anyway.
Near the beginning of The Last Jedi, the Resistance jumps into hyperspace to get away from the First Order. It seems reasonable to assume they jumped to a random, unpredictable location in deep space to lose the First Order and regroup. There seems to be no plan for further action at this point. These points are evidenced by the following conversation:
FINN: We're really nowhere.
[...]
FINN: Alright, so until she gets back, what's the plan?
LEIA: We need to find a new base.
Immediately after, First Order ships catch up. As a result of the confrontation, there's only one thing the Resistance can do: speed away from the enemy ships using their standard engines.
The main premise of the movie is the desperate chase in space, and the feeling of hopelessness coming from the fact the Resistance apparently has nowhere to run. So the revelation that there was actually an abandoned Rebel base, with anti-orbital bombardment shields, gigantic blast doors and powerful antennas, exactly on their course, within 24 hours of sublight travel, comes as a complete deus ex machina.
The chances of this happening are mindbogglingly small, so it seems it must have been the plan all along. This is what the Visual Dictionary states (taken from this answer):
THE LAST GASP of hope for the Resistance is the otherwise uninviting mineral planet of Crait, tucked in a remote sector of the Outer Rim Territories. This has been Leia Organa and Amilyn Holdo's secret endgame - bunkering down on a former rebel world that had fallen off most modern starcharts. The Resistance's penchant for using old rebel-era caches and facilities is part of Leia's strategy, for she alone has a store of navigational information from the early days or the Rebellion that she has never shared.
But this just raises more questions:
- If they aimed for Crait, why did they exit hyperspace so far away from the planet, especially as they barely had enough fuel to actually reach it?
- Why did Leia say "We need to find a new base" if they already travelled to one?
And there's the fact that once First Order ships appeared, there was only one direction of travel available. It's still extremely lucky that Crait was exactly there...
Is there any explanation for this?
It seems reasonable to assume they jumped to a random...location
There's your first assumption.