system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] Leia knew the Empire was following them, why did she then lead them straight to the secret rebel base, why not ditch the MF on a dead planet after sending a message to the rebels to send a ship to pick them up. A ship not being tracked by the Empire.
gpt
They had already jumped to hyperspace by the time Leia had a chance to warn Han about the tracking device, and there's only so many planets along the course that the Falcon took away from the Alderaan system.

Now, while it's possible that the Falcon could have dropped out of hyperspace in order to jump into a new heading, the Empire isn't stupid: this was a happenstance rescue, sloppy and doomed to failure had they not allowed the Princess to leave. The TIEs forced the rebels into a hasty jump, which told the Empire what they needed to know.

Basically, from the moment the Falcon jumped into hyperspace, it would only be a matter of time before the Empire showed up at Yavin. Leia knew this. She also knew that their only hope was to analyze those plans as soon as possible and formulate some sort of miraculous defense.