This question already has an answer here:
After Han and Luke rescue Princess Leia from the Deathstar, one of the first things Leia says to Han-after they fight off a very meager squad of Tie Fighters-is that their escape was too easy, and that the only explanation for the ease of their escape was that they were being tracked.
HAN Not a bad bit of rescuing, huh? You know, sometimes I even amaze myself. LEIA That doesn't sound too hard. Besides, they let us go. It's the only explanation for the ease of our escape. HAN Easy... you call that easy? LEIA **They're tracking us!** HAN Not this ship, sister.
WILLARD When we heard about Alderaan, we were afraid that you were... lost along with your father. LEIA We don't have time for our sorrows, Commander. **The battle station has surely tracked us here.** (looking pointedly to Han) It's the only explanation for the ease of our escape. You must use the information in this R2 unit to plan the attack. It is our only hope. EXT. SPACE The surface of the Death Star ominously approaches the red planet Yavin.
Leia personally witnessed the awesome power of the Deathstar destroy her home planet, and admitted that it was only a hope that a weakness could be found in the stolen data R2 was carrying.
LEIA At least the information in Artoo is still intact. HAN What's so important? What's he carrying? LEIA The technical readouts of that battle station. I only hope that when the data is analyzed, a weakness can be found. It's not over yet!
Why was Leia so willing to knowingly lead the Deathstar to the Rebel base?
When faced with the destruction of her home world she was clever enough to send them to an abandoned base, why didn't Leia use the Millennium Falcon to lead them away from the Rebel stronghold? Why didn't she get Han to drop them off somewhere they could meet up with some sympathizers and catch a new ride to the Rebel base or just ship R2 there? Why didn't she insist that R2 figure out how they were being tracked and disable the beacon? Or even better yet, why didn't she use this knowledge to her advantage and lead the Deathstar to a strategically advantageous location to engage or ambush it, like a meteor or asteroid rigger to explode? As clever as she was the only solution shouldn't have been, "They're following us. We had better lead them exactly where they want us to and hope that we can come up with a plan before they catch up to us!"
I'm not the only one to wonder about this: