Let's say you have a structure $S$. This structure is a combination of a few Attributes, each from a certain set of possible values.
If we let $A_1,...,A_n$ be the sets of the possible values for the corresponding attributes, then we can, pretty general, define the structure $S$ as follows:
$$
S:= \{\pmatrix{x_1\\\vdots\\x_n}\in ⨉_{i=1}^n A_i\mid P\pmatrix{x_1\\\vdots\\x_n} \}
$$
Where $P$ is a predicate, i.e. it models our constraints, on which combinations of attributes are allowed.
Our goal, as usual in combinatorics, is determining $|S|$.
We say that the structure $S$ is independent of an attribute $A_i$ is (in the combinatoric sense), if:
$$
\forall x_1\in A_1,...,x_n\in A_n,y_i\in A_i:\qquad P(x_1,...,x_i,...,x_n) = P(x_1,...,y_i,...,x_n)
$$
Simply put this means that we don't need to look at the value of attribute $A_i$ to find out whether a specific instance of the structure is valid.
We therefore can fix a specific $x_i\in A_i$ (which exactly we choose doesn't matter), and define
$$P': ⨉_{k=1\\i\neq i}^n A_k\to \{\text{True},\text{False}\}$$
via
$$P'(x_1,...,x_{i-1},x_{i+1},...,x_{n}) = P(x_1,...,x_{i-1},x_i,x_{i+1},...,x_{n})$$
In terms of the cardinality, this then means the following:
$$
|S| =|A_i|\cdot |\{\pmatrix{x_1\\...\\x_{i-1}\\x_{i+1}\\...\\x_{n}}\in ⨉_{k=1\\k\neq i}^n A_k\mid P'\pmatrix{x_1\\...\\x_{i-1}\\x_{i+1}\\...\\x_{n}} \}|
$$
As for every tuple $\pmatrix{x_1\\...\\x_{i-1}\\x_{i+1}\\...\\x_{n}}$, the structure instance $\pmatrix{x_1\\...\\x_{i-1}\\x_i\\x_{i+1}\\...\\x_{n}}$ is either valid for all choises of $x_i$, or for none of it.
To finish this, let's look at your example.
Our structure is the set of valid cards, where each card has the two attributes suit and rank.
Therefore we have $n=2$, $A_1:= \{\text{Hearts, Diamonds, Spades, Clubs}\}, A_2:=\{ 2,3,\dots,\text{King},\text{Ace} \}$.
Since we have no restrictions on our set members of $S$ besides that we have to pick from every attribute, we have further $P(x_1,x_2)=\text{True}$.
So, our structure $S$ is in this case independent of both $A_1$ and $A_2$, and therefore we have $|S| = |A_1|\cdot |A_2|$
Best Answer
You might consider whether the 5 of hearts is different from the heart 5 ? There is clearly a bijection between Rank x Suit and Suit x Rank. So A x B is in that sense quite similar to B x A.
What differentiates A x B from B x A is better revealed when A and B have the same elements (rather than for example suits and ranks), but meaning is attached to order of the pairing of the elements of A and B. What about $R^2 = R \times R$, identifiable with the x-y plane ? Now, we can see that $(x, y) \ne (y, x)$ unless $x = y$.
In the most common (ZF) treatment of ordered pairs, for $a \in A $ and $b \in B$ the ordered pair $(a, b) $ is defined as the set {a, {a, b}}. This distinguishes it from the set {b, {a, b}} unless a = b.
In More Detail
In the card example we create sets representing suits and ranks which are disjoint (in English), so that Suits = {C, D, H, S} and Ranks = {2, 3, 4, ,5, 6, 7, 8, 9, 10, J, Q, K, A}. There is a set representing cards, perhaps identified as Cards = {2C, 3C, ...AS} (at my bridge club they have bar codes for the dealing machine). We see there is a bijection between Suits x Ranks and Cards so that a card is identifiable by its suit and rank, and equally there is a bijection between Ranks x Suits and Cards and a card is identifiable by its rank and suit. Mathematically (in ZF set theory), the elements of the Cartesian products Suits x Ranks differ from the elements of Ranks x Suits: they both consist of elements which are sets, but the one looks like {C, {C, 2}} while the other looks like {2, {2, C}}, or in the more conventional ordered pair notation (C, 2) and (2, C). The elements which comprise the two Cartesian products are different so that in set terms, Suits x Ranks $\ne$ Ranks x Suits. They are interpreted to mean the same because:
But, in maths a lot of ordered pairs we meet are numbers. In the X-Y plane X = {x|x $\in$ R} and Y = {y|y $\in$ R}, so in fact X = Y = R and it follows that X x Y = Y x X = R$^2$ (any pair of numbers e.g. (5, 3.72) exists in R$^2$, is a point in the X-Y plane and a point in the Y-X plane: the three Cartesian products contain the same elements and are therefore the same set). Now to understand the ordered pair we cannot identify which element belongs to which set by its value, we need to know what the order represents, i.e. the first element is a X-value, the second a Y-value.
This leads to a somewhat ironic conclusion that