Suppose that X is independent of Y, and let Z be any event. Is it true that:
$$ \mathbb{P}[X,Y|Z]=\mathbb{P}[X|Z]*\mathbb{P}[Y|Z] $$
Moreover, if that is true, then:
\begin{align*} (\mathbb{P}[X|Z]\mathbb{P}[Z]+\mathbb{P}[X|Z^c]\mathbb{P}[Z^c])*(\mathbb{P}[Y|Z]\mathbb{P}[Z]+\mathbb{P}[Y|Z^c]\mathbb{P}[Z^c])&=\mathbb{P}[X]\mathbb{P}[Y]\\ &=\mathbb{P}[X,Y]\\ &=\mathbb{P}[X,Y|Z]\mathbb{P}[Z]+\mathbb{P}[X,Y|Z^c]\mathbb{P}[Z^c] \end{align*}
and so on... but, I have a counterexample for the last equation. So I'm getting confused, what's wrong here?
No -- the unconditional independence of $X$ and $Y$ does not imply conditional independence given any event. You can choose some event that gives you information about both $X$ and $Y$ simultaneously. For example, let $X,Y,Z$ be i.i.d. and consider the event $A = \left\{X \leq Z, Y \leq Z\right\}$.