In mathematics (specifically in linear algebra) an affine transformation is a combination of a linear transformation and a translation, i.e. a map of the form: $$x \mapsto ax + b$$ where $a$ and $b$ are constants independent of $x$.*
This is exactly the form that the encryption operation in an affine cipher takes, and presumably where the name comes from.
Indeed, as I note in my earlier answer, this is the explanation given by Douglas R. Stinson in his 1995 book Cryptography: Theory and Practice, which contains the earliest description of the affine cipher in its "modern" educational form that I'm aware of (emphasis original):
In the Affine Cipher, we restrict the encryption functions to functions
of the form $$e(x) = ax + b \bmod 26,$$ $a, b \in \mathbb Z_{26}$. These functions are called affine functions, hence the name Affine Cipher.
(FWIW, the terms "function", "map" and "transformation" are used more or less interchangeably in linear algebra. They may imply a slightly different perspective, but in the end, every transformation is a map and can be represented as a function.)
*) The types of the constants $a$ and $b$ and the argument $x$ depend on the space the transformation is defined on. Typically, for an affine transformation of vectors from $\mathbb R^m$ to $\mathbb R^n$, $x$ would be an $m$-element vector, $a$ would be an $n \times m$ matrix, and $b$ would be an $n$-element vector. But the general concept of an affine transformation can also apply to other kinds of mathematical objects. For example, affine cipher encryption can be seen as an affine transformation on the set of integers modulo $n$ (where $n$ is the cipher alphabet size), regarded as a module (a generalization of a vector space) over the integers (or even over itself).