When we try to see if the weak sector is $CP$ invariant, we $CP$ transform all the fields in the charged interactions terms and we get a condition involving the elements of the CKM matrix and the arbitrary phases of the $CP$ transformed fields:
$$V_{ij} = V^*_{ij} \, e^{i(\xi_W + \phi_{d_j} - \phi_{u_i})}$$
Then, the argument goes: there are $9$ parameters in $V_\text{CKM}$ because it is a general $3 \times 3$ unitary matrix. These $9$ parameters are split in $3$ "angles" and $6$ phases, the $3$ angles being the ones you get if you restrict to an element of $\text{SO}(3)$.
To make the above condition hold, we need to fix the $CP$ phases to cancel the $6$ CKM phases. We have $7$ $CP$ phases (1 from $W$, $3$ from the downs and $3$ from the ups), so it seems like we can do it.
But then we say "actually we have only $5$ independent $CP$ phases, because there are $2$ residual global symmetries corresponding to baryon number and electric charge". Therefore, $1$ phase remains in the CKM and the condition can never hold.
I don't understand the last point: why does the presence of $\text{U}(1)_\text{B}$ and $\text{U}(1)_\text{Q}$ global symmetries reduces the number of $CP$ phases I can fix to cancel the CKM phases?