Why use two affine transformations in Multivariate Cryptography?
In the majority of multivariate cryptographic schemes (MQ) the encryption/signature function $E$ is a composition of secret affine invertible transformations $A,B$ and a nonlinear transformation $P$ (can be secret or public):
$$
E = B\circ P\circ A
$$

$P$ is typically invertible, and the goal of the scheme is to make $E$ non-invertible even though it is fully exposed to an attacker as a polynomial.

The mere fact that $P$ is invertible explains why we need both $A$ and $B$. Indeed, suppose that $A$ is missing, then in the equation
$$
E(x) = B(P(x))
$$
we substitute 
$$
x = P^{-1}(y)
$$
and obtain
$$
E(P^{-1}(y)) = B(y),
$$
so we know $B$ and are able to invert $B$.

This is the simplest case; there are other variants, where $P$ is secret, or its inverse is not available in the closed form, or some of the output polynomials are dropped (OK for signatures). In some of these variants both $A$ and $B$ are still required as otherwise you could invert the scheme just by looking at the structure of the polynomial and comparing monomials of $E$ with monomials of $P$. However, say, if $P$ is secret, then both $A$ and $B$ can be considered as part of $P$.