Consider the rotational symmetries of the square cuboid. If we define the longitudinal axis to be the y-axis, then there is a rotation about the y-axis of order $4$, that is the rotation of $90$ degrees, this has the following elements:
$$R_0, R_{90}, R_{180}, R_{270}$$
Their matrices are represented by the unitary orthogonal $det = 1$ matrices with the eigenvector $(0, 1, 0)$ corresponding to the eigenvalue $1$.
Then there is a rotation going through the x and z axis, each of order $2$ and 180 degrees in both directions, this yields 4 rotations of order $2$. Again, this corresponds to the orthogonal matrices with eigenvalue $1$ and corresponding eigenvector $(1, 0, 0)$ and $(0, 0, 1)$. We have just counted $4+4$ rotations, and four of them are in the form of $R_0, R_{90}, R_{180}, R_{270}$ and the other four are of order $2$... sound familiar?
Perhaps not very coincidentally, this subgroup of rotations is actually a copy of $D_4$ (check by the presentation definition of a dihedral group, that is it can be generated by two involutions), such that:
$$D_4 = <a, b \ | \ a^n = b^2 = I, (ab)^2 = I>$$
$D_4$ is normal in the symmetries of the square cuboid (since it has index $2$, used by the assumption given in the question before, that is has $12$ isometries). Noting that the entire symmetry group can be composed by all the rotations and a single reflection, consider the point of inversion $-I$. It is trivial to prove that $\{I, -I\}$ is normal as well. (noting that $-I^{-1} = -I$).
What have just showed? We have showed that the symmetries can be composed via two normal subgroups with only the trivial intersection, the rotations being isomorphic to $D_4$ and the set $\{I, -I\}$ being isomorphic to $\mathbb{Z}_2$ (you can check this manually be reviewing the subgroup of matrices).
Indeed the symmetries of the 4-prism is isomorphic to $D_4 \oplus \mathbb{Z}_2$
Additionally, more simply is that once you have composed the entire rotation subgroup in the square cuboid, you know that it is symmetric about the origin (the tetrahedron defies this). Since it is symmetric about the origin, that means you can take the direct product with $\mathbb{Z}_2$. This immediately yields the intended isomorphism.
So why isn't that transformation included in it's symmetry group?
Who says it isn't? In the quoted wiki article we read:
Such a transformation is an invertible mapping of the ambient space which takes the object to itself, and which preserves all the relevant structure of the object.
Most generally the symmetry group of an object is just a set of all auto isomorphisms of that object. The word "relevant" is crucial here and in different context it means different things.
If you look at the square as a set then isomorphism = bijection and your example is valid. If you look at it as a topological space then isomorphism = homeomorphism and your example fails cause switching 2 points is not continuous. If you look at it as a subset of some vector space then isomorphism may mean linear isomorphism. If it is metric space then it may mean isometry and so on and so on...
Best Answer
To expand on the comment—you're missing the elements of the rotational symmetry group that are the composition of a 180° rotation about the $x$ or $z$ axis and a 90° rotation about the $y$ axis.
To see the group isomorphism intuitively, you can think about identifying the vertical edges of length $c$ in this figure with the vertices of a square. By extruding the vertices of the square into edges, the reflections in the square's symmetry group become the 180° rotations about the $x$ and $z$ axes in this figure's rotational symmetry group.