system
Given the following post, respond as if you're commenting on Reddit:
human
[Star Wars] Why did the Rebels not evacuate Yavin when the Death Star was approaching?

For comparison, when the Imperial fleet launched a surprise attack on Hoth they managed to evacuate almost everyone, while under enemy fire.

Yet on Yavin they send up 30 one man fighters, then just sit there waiting for the Death Star to get close enough fire.
gpt
The Yavin IV attack was more surprise than the attack on Hoth. Though Leia Organa Solo was suspicious that Millennium Falcon was being tracked, the tracking beacon was never found. When the Rebels received the Death Star plans they began analysing them for weaknesses. When the first Death Star fell out of hyper space in the Yavin System, the Rebels had a battle plan ready to be put to use. The Empire did not know of any weaknesses to the station, Grand Moff Tarkin viewed the fighter attack as a futile effort. 

The attack on Hoth was not a surprise attack. The Imperial Recon Droid gave away the element of surprise. As Commander Solo indicated after he destroyed the droid, it was a good bet the Empire knew they were there.

There was also a significant difference in fire power between a Star Destroyer and the Death Star. The Death Star could fire any transport vessel out the sky on an attempted escape. Hoth's Ion Cannon was able to temporarily disable the Star Destroyer's offensive capabilities allowing transport ships to get through.