Duke Leto Atreides murdered his people and the Harkonnen deserved to reclaim Arrakis
Duke Leto was criminally negligent once on Arrakis and didn't foresee even the most obvious of situations that were dangerous to his people. He should've foresaw the Harkonnens would be transported there for an attack, as he knew the Emperor was pitting the two houses against each other. He didn't even setup something as simple as radar to give them an alert when ships were entering his atmosphere. No watchtowers with guards scanning the horizon, ready to sound an alarm bell when ships landed _in their courtyard._ The entire proactive defense seemed to be two guards standing in front of his personal chambers.
That level of negligence and naivety shows House Atreides never could've succeeded at the task.