If $X$ and $Y$ are sets, and $|X|$ and $|Y|$ be their cardinality, then by definition, addition of cardinals are their disjoint union: $$|X|+|Y|=|X\cup Y|$$ While the rule of addition for infinite cardinals states $\kappa+\mu=\max(\kappa,\mu)$, which were discussed here.
I am puzzled here regarding how these two can be compatible. If both $X$ and $Y$ are infinite, does it mean the cardinality of $X\cup Y$ must be the same as the greater of $|X|$ and $|Y|$?
It is more confusing when using Konig's theorem to prove $\kappa<\kappa^{\mathrm{cf}(\kappa)}$ here. It states that "Apply this result to the case where $I=\mathrm{cf}(\kappa)$, $\langle A_{i}\;|\;i<\kappa\rangle$ is a partition of $\kappa$ into sets of cardinalities < $\kappa$ (which is a required condition by the theorem), and $B_{i}=\kappa$ for all $i$". Then concludes: $$\kappa=\left|\bigcup_{i\in I}A_{i}\right|<\left|\prod_{i\in I}B_{i}\right|=\kappa^{\mathrm{cf}(\kappa)}$$ But how can a bunch of cardinals strictly lesser than $\kappa$ adds up to $\kappa$ at the left side?
This is very simple.
Note that for the natural numbers, if we add any finite or countable set, we can simply re-order everything and just have a bijection with the natural numbers again.
For example $\Bbb N\cup\{-1,-2,-3\}$ can be mapped to $\Bbb N$ by $f(n)=n+3$, for example.
The infinite cardinals, in the presence of the axiom of choice, behave very similar to that. They swallow anything smaller than themselves. But in the presence of the axiom of choice, any two cardinals are comparable. So either $\mu\leq\kappa$, in which case $\kappa$ swallows it; or $\kappa<\mu$, in which case $\mu$ swallows $\kappa$.
For infinite sums and products, however, the rules change. This is no longer the maximum anymore, because just because the finite sums and products behave in a certain way does not mean that infinite sums or products behave that way either.
(The situation is different without the axiom of choice, where the basic rules of cardinal arithmetic is still valid, but some cardinals may be incomparable, or not have the ability to swallow one another, in which case $|X|+|Y|$ might be properly larger than both $|X|$ and $|Y|$. And without the axiom of choice, I should add, infinite sums and products might not be well-defined anymore.)