Egyptians were pretty bad. They killed Jewish boys. It's as bad as the Chinese one-child policy. But God told Jews not to abhor the Egyptian.
The Amalekites are evil too. But they did not have non-aggression pact with Jews. They didn't back-stab the Jews. They attacked other wandering tribes like Jews attacked Cannaites. Why was God's judgment toward Amalekites harsher?
More controversially, we have laws that Jews are expected to threaten neighboring countries before killing them.
As you approach a town to attack it, first offer its people terms for peace. If they accept your terms and open the gates to you, then all the people inside will serve you in forced labor. But if they refuse to make peace and prepare to fight, you must attack the town. When the LORD your God hands it over to you, kill every man in the town. But you may keep for yourselves all the women, children, livestock, and other plunder. You may enjoy the spoils of your enemies that the LORD your God has given you. Deuteronomy 20:10-14
Okay, so this town did nothing wrong besides refusing to be slaves, which is pretty much what every single town would do now. Why is the judgment over them so harsh?
I can think of a few explanations. Perhaps God simply wants his people to be slightly better, rather than perfect. Everyone else is enslaving everyone else at that time, so threatening of slavery is pretty much the market standard of the ever-evolving morality we have. But this still leaves many issues unresolved.
I don't know which one is right. What's Judaism's perspective on this? How would Jews explain this judging algorithm?