Why is modular arithmetic called "modular"? I think of modular in the context of "modular design" which is basically subdividing a system into self-contained chunks. modular is based on the word modules which are like self contained lessons or sections. There is almost a sense of functional programming here where you can think of "modular" as meaning "atomic" in the way that a pure function is the most distilled version of a black box yielding output from a given input.
Based on the above concept, here is my hypothesis regarding why modular arithmetic is called modular. If you do modular arithmetic on a given modulus, say $n$, then you are dividing the set of integers into $n$ discrete chunks, reminiscent of how a system is broken down in modular design.
 A: In ancient times divisibility was conceptualized by "measurement". Thus  the ancients would write $\,n\,$ measures $\,a\,$ for our $\,n\,$ divides $\,a,\,$ and the divisor was thought of as a "unit of measurement" - which is one of the meanings of "modulus" in Latin. Therefore, expressed in ancient terms, $\,a\equiv b\pmod n\,$ was viewed geometrically as: the distance between $\,a\,$ and $\,b\,$ can be measured exactly using a ruler whose unit of measurement ("modulus") $= n$.
In modern times the denotation has been greatly generalized so that roughly speaking $\, x\bmod y\,$ simply means $\,x\,$ assuming $\,y\,$ [often $\,y\,$ is viewed as "small" in some sense, e.g. the proof is complete (mod trivial edge cases left to the reader)].
When $\,y\,$ is an equality (or set of such) then $\,x\bmod y\,$ means we are working modulo the smallest equivalence relation generated by the equalities that is additionally compatible with any ambient structure, e.g. in an algebraic structure it denotes the congruence relation generated by the equalities (said equivalently, assuming all the equalities that can be derived from the listed equalities using the axioms of the algebraic structure).
In algebraic structures (like rings & groups) enjoying "subtraction" we can "zero-normalize" all of our equations $\,a = b \iff a-b = 0,\,$ so we can write $\,x\bmod y,z\,$ for $\,x\bmod y=0,z=0.\,$  Here congruences are completely determined by the equivalence class of $\,0\,$ (so-called ideal-determined algebras), so congruences can be replaced by ideals, and instead of writing equations we can simply list the generators of the ideal, e.g. $\,R[x]\bmod (p,x^2+1)$ denotes the quotient ring $R[x]/(p,x^2+1),\,$ which is the most general ring image of $R[x]$ assuming  $\,p=0\ \ \&\ \  x^2+1 = 0.\,$ Similarly for groups, e.g. in  presentations given by generators and relations, the relator elements $\,r,s\,$ in $\,\langle x,y\mid  r,s\rangle\,$ denote the equations $\,r=1,\,s=1\,$ in multiplicative notation.
The term "modular design" is somewhat related, since decomposing a system into related component modules can be viewed as a (non-mathematical) generalization of the above said partition into equivalence classes that is induced when working mod equations. Both methods can be viewed as instances of the divide and conquer method of problem solving.  Of course in algebra we generally have much more innate structure that we can exploit.
For example, decompositions into products of "simpler" structures is a prototypical algebraic way of dividing and conquering in algebra. This is familiar elementwise in terms of integer factorizations into products of primes - then working "locally" on each prime(power) factor (or more general local-global methods). More structurally we can divide using ring factorizations given by CRT = Chinese Remainder Theorem. More broadly there are such product decompositions for general algebras, e.g. by Birkhoff's Theorem every algebra $A$ is isomorphic to a subalgebra of a sd(subdirect)-product of sd-irreducible images of $A,$ so we reduce to studying sd-irreducible algebras (this generalizes Stone's representation theorem for Boolean algebras, where the only sd-irreducible Boolean algebra is the two-element Boolean algebra; similarly for vector spaces (over a fixed field), and a one-dimensional vector space).
A: Based on the Wikipedia article on the topic, the term is not derived from "modular" design, but from the Latin word modulus which means "a small measure".
The "modular" in "modular design" is likely also derived from Latin, meaning the two usages of the word are cousins, neither being derived from the other.

Modulo is a mathematical jargon that was introduced into mathematics
in the book Disquisitiones Arithmeticae by Carl Friedrich Gauss in
1801. Given the integers a, b and n, the expression "a ≡ b (mod n)", pronounced "a is congruent to b modulo n", means that a − b is an
integer multiple of n, or equivalently, a and b both share the same
remainder when divided by n. It is the Latin ablative of modulus,
which itself means "a small measure."

