What does this line in Lang's "Algebra" mean? Lang's "Algebra" says the following:

Let $S$ be a set. A mapping $S\times S\to S$ is sometimes called a law of composition (of $S$ into itself).

I always thought $S\times S\to S$ implied a binary operation on two elements of $S$, and $S$ being closed on that binary operation. 
I also thought the word "composition" belonged to the world of mappings.
I don't see how a binary operation can be called a mapping.   
EDIT: I must confess I have come across such a usage of the term "composition" before, but could never quite get the motivation behind it. Really hoping for an elaborate answer to shed light on this issue; something that I am sure confuses other autodidacts out there too. 
 A: A mapping from $S \times S$ to $S$ constructs a new element of $S$ by combining two given elements of $S$. So, for example, addition is a mapping $(a,b) \mapsto a+b$ that combines two elements to construct their sum, and multiplication combines two elements to construct their product.
And "composition" is just another word for "combining/constructing". In fact, in the original Latin, "compose" literally means "put together".
This is somewhat different from the "composition" that combines a function $f$ and a function $g$ to give their composition $f \circ g(x) = f\big(g(x)\big)$.  Maybe that's the source of your puzzlement.
In one particular case, composition of functions fits into the general framework I outlined above. If we let $S$ be the set of mappings from some set $X$ to itself, then the function composition operation $(f,g) \mapsto f \circ g$ is a binary operation on $S$. So, in other words, it's a "law of composition" on $S$. But I don't think this is very significant. I think the term "law of composition" is related to general "combining/constructing", not to the specific operation of composing mappings.
Regarding your other point: a binary operation definitely is a mapping. Specificially, a binary operation on a set $S$ is a mapping from $S \times S$ to $S$. See the examples of addition and multiplication above.
A: The phrase “law of composition” is a direct translation from the French loi de composition (usually also interne is added). See Bourbaki, Éléments de Mathématique.
It's just a name and has nothing to do, in general, with function composition. Indeed, Lang says that sometimes a map $S\times S\to S$ is called a law of composition, probably aware of the fact that this locution is not very used in English speaking countries. It used to be frequent also in Italian text, under the influence of Bourbakism.
A binary operation is just a map (or mapping, if you prefer): to any (ordered) pair of elements in a set $S$ it associates an element of $S$. So it's best treated as a map (mapping, function, application, representation are also used), without introducing new concepts that aren't useful.
A: The first groups that were studied are symmetry groups, like
$$
S_n = \{\, \varphi: [n]\to[n] \,\mid\, \text{$\varphi$ bijective}\,\},\quad
\text{where $[n]=\{1,2,\dots,n\}$}
$$
or the symmetry groups of geometric objects like polyhedra. In all of these, the elements actually are self-maps on some set and the group composition is the actual composition of these maps as maps.
These examples motivate why we sometimes call the operation in a group a composition.
A: Associativity is often considered one of the most fundamental axioms in abstract algebra for a binary operation $S \times S \to S$, and it is well known that a set of functions under the binary operation of composition will automatically satisfy associativity.
Conversely, for a fixed $x \in S$, if we denote the function $t \mapsto x \cdot t$ by $L_x: S \to S$, then associativity can be restated as $L_{xy} = L_x \circ L_y$. Thus we see that the axiom of associativity is precisely the statement that, up to renaming, the binary operation is given by composition of functions on some set. So in the context of an associative binary operation, the term "law of composition" really does make sense.
