If your problem has an algebraic structure, you can rewrite your code in many more ways than you could if it didn't.
For instance, associative (not even necessarily commutative) problems do not have to be processed as given, but can be chopped up into hardware-size chunks, each of which is treated in a "flat" manner (ie. suitable for mapping to a warp or loop).
Abstract algebra has a strong crossover into type theory, it you think of types as sets. Maybe not strictly useful while bashing out python code but it's nice to have an elegant mental model