I'm not sure if this was a rhetorical question...but the answer is that districts are drawn by the ruling party in order to assure its continued dominance. The incentives for these legislators are totally different from Amazon's.
A very interesting example happened in Georgia in the 1990s. The Republicans and the Black Caucus (who are mostly Democrats) worked together to pack black voters into a few concentrated districts. This resulted in both more black Democratic legislators and more Republican legislators.