Looking at the same thing in two different but equivalent ways offers insight.
A Binomial$(n,p)$ variable is the sum of $n$ independent Bernoulli$(p)$ variables. A Bernoulli variable works exactly like drawing one ticket from a box in which all tickets have either a $0$ or $1$ written on them; the proportion of the latter is $p$.
To say that $X=x$ means that $n$ such tickets were drawn from such an "$X$ box" (with replacement each time) and $x$ of them had a $1$ on it. To say that $Y$ has a Binomial$(X,q)$ distribution amounts to performing a second follow-on experiment in which $x$ draws (with replacement) are made from a separate box, the "$Y$ box," in which the proportion of tickets with $1$s is $q$. The value of $Y$ is the count of the $1$s that are drawn.
An alternative way to carry out the same procedure is not to wait until all $n$ tickets are drawn from the $X$ box. Instead, after drawing each ticket, immediately read its value. If it says $X=0$, do nothing more. If it says $X=1$, though, immediately draw a ticket from the $Y$ box and read its value.
This alternative procedure can be described by drawing a single ticket from a new box. Up to two numbers are written on each ticket, called "$X$" and "$Y$", to record a single sequence of up to two draws. According to the foregoing description, which has three outcomes, there must be three kinds of corresponding tickets:
$X=0$. These tickets model drawing a value of $0$ from the $X$ box. Their proportion within the new box, in order to emulate the properties of the first step, must equal $1-p$. Don't bother to write any value for $Y$, because $Y$ will not be observed when such a ticket is drawn.
$X=1, Y=0$. These tickets model drawing a $1$ from the $X$ box and then a $0$ from the $Y$ box.
$X=1, Y=1$. These tickets model drawing a $1$ from the $X$ box and then a $1$ from the $Y$ box.
The total proportion of tickets of types (2) and (3) must equal the proportion of $1$s in an $X$ box, namely $p$. Since $Y$ is drawn independently of $X$, the fraction of the tickets with $X=1$ for which $Y=1$ must be $q$. The fraction of the tickets with $X=1$ for which $Y=0$ similarly must be $1-q$.
To summarize, the three tickets and their proportions in the new box must be
$X=0$, proportion $p$.
$X=1, Y=0$, proportion $p(1-q)$.
$X=1, Y=1$, proportion $pq$.
What kind of variable is $Y$? According to our new (but equivalent) description, it is obtained by drawing $n$ tickets from the new box (with replacement) and counting the number of times a value of $1$ for $Y$ is observed. The only way this can happen is when the third type of ticket is drawn. These occupy a fraction $pq$ of all the tickets. This exhibits $Y$ as the sum of $n$ independent Bernoulli$(pq)$ variables, whence $Y$ has a Binomial$(n, pq)$ distribution.