French demonstratives must match the gender and number of the noun.
For this / that:
Since gâteau is masculine singular and starts with a consonant sound, French uses ce:
If it were a masculine noun starting with a vowel, you would use cet, for example:
Il refers to l'emballage, not to ce gâteau.
So the idea is:
This is important because the nearest noun in English is not always the one French is referring to. Here the main topic is l'emballage, so il replaces that noun.
Since emballage is masculine singular, the pronoun is il.
French often uses a subject pronoun in the second clause instead of repeating the full noun, just as English uses it.
So:
is more natural than repeating:
The pronoun keeps the sentence smoother.
It actually already agrees with emballage, but pratique is one of those adjectives whose masculine singular and feminine singular forms look the same.
So you get:
That means the form does not visibly change in the singular, even though agreement is still there.
Compare:
Both use pratique.
Not always. Ce / cet / cette / ces can mean this, that, these, or those, depending on context.
So ce gâteau could mean:
If the meaning has already been shown to the learner, then the context tells you which one is intended. French does not always make the same distance distinction that English does.