This is a broad question, so I will give a specific example from linear algebra, but I vaguely recall the general idea working in other contexts as well. The general idea is that given $x, y$ in a set we sometimes just have to check that $x - y$ is also in the set (or some other similar condition involving differences), then we get a bunch of nice properties or structure or satisfied conditions.
For example, in linear algebra, if $U$ is a subspace of $V$, and we define an affine subset to be a set of the form $v + U$ for some vector $v \in V$, then we have the following result: for any $v, w \in V$, the following are equivalent: (a) $v - w \in U$, (b) $v + U = w + U$, (c) $(v + U) \cap (w + U) \neq \emptyset$. My intuition for it is as follows:
If $v - w \in U$, this means whenever we have a $v + u$ we can “replace” $v$ by $w$, “up to a change of the subspace element”. We do this by writing $v + u = (v + u) + (w - w) = w + ((v-w) + u)$, which is an element of $w + U$. So to replace $v$ by $w$, we just change the subspace element, which is doable since $v - w \in U$. And vice versa, we can “replace” the $w$ in $w + u’$ by $v$ by replacing $u’$ with $-(v-w) + u’ \in U$. Hence $v + U = w + U$. We might also think of $v - w \in U$ as meaning that the “diagonal” between $v$ and $w$, which “connects” the two vectors, is in $U$. So, we can manipulate any expression of the form $v + u$ to get it to be $w + u’$ (and vice versa).
On the other hand, if $v + U = w + U$, then they have nonempty intersection, so $v + u_1 = w + u_2$ for some $u_1, u_2 \in U$. Hence $v - w = u_2 - u_1 \in U$. The way I might think about this is: because $v + U = w + U$, this forces upon us an equation/relation in terms of $v, w$ and some elements of the subspace (specifically, the equation $v + u_1 = w + u_2$). So we have no freedom/choice left for $v - w$, because rearranging this equation gives $v - w = u_2 - u_1 \in U$. $v - w$ has no choice but to live in the subspace.
Why is this idea of closure under differences important or desirable? Am I thinking about it “correctly”? I would appreciate any general comments, e.g. about how you think of it. Also, I know my example from linear algebra isn’t as general as possible but I don’t really know other examples.
Edit: I know my example wasn't necessarily about "closure under differences" but more so about just "differences", but I mean we still see how it can be important to consider differences. Sorry about that.