Cantrips level with your character, not your class
While it never explicitly states this anywhere in basic or the PHB, it only states the level at which the cantrip increases in power. One of the design goals of 5e and one of the things it imported from 4e was that there should never be a time where a magic user is forced to resort to making a weapon attack that they are ill-suited for. Cantrips act like 4e's At-Will spells and as such level with each "tier" in 5e to maintain their usefulness. Tying this to character level means that players who multiclass or for example start off with a free cantrip (such as High Elves) are still able to make use of those cantrips throughout the whole of the game.
A clarification was added to the Sage Advice Compendium.
Cantrips
If a character has levels in more than one class, do the character’s cantrips scale with character level or with the level in a spellcasting class?
Cantrips scale with character level. For example, a barbarian 2 / cleric 3 casts sacred flame as a 5th-level character. (Sage Advice Compendium V_2.0; page 11)
Later, this was added to the rules for multiclass spellcasters (PHB, p. 164) in the Player's Handbook errata:
If a cantrip of yours increases in power at higher levels, the increase is
based on your character level, not your level in a particular class.