DnD 5e is the base to play games in Melyria. Here, I will explain different ways the classes in DnD 5e can be viewed, what subclasses and even homebrew classes are in use and how GM has integrated them to the lore of the world.
This section is not here to tell how one should build their character, but to explain how some NPC's got their stat blocks and how the world views people of certain player classes, and maybe give inspiration if you are not sure what character or character class you should play or how to flavour it, story-wise. If a character has a class (was it perceived or statistical) it might appear as PCs or NPCs profession.
Class is not a job
(even if it appears in a profession template)
One thing we should define before going further, is that characters class doesn't need to define what kind of occupation or occupational background they come from. There are a couple of things you should take account in your background that should make sense for things to work out mechanically, but you are free to have pretty much any backstory you want. As long as it makes sense (even loosely) that your character has gained the type of experience that would make them act mechanically like your chosen class, that's fine. This is very true with several NPCs.
As an example: Not all clerics and paladins need to be priests, not all priests are clerics or paladins.
Paladins and clerics have a special connection to an otherworldly entity (usually a deity) who blesses them with powers and guides their actions, or at least gives them back support. Depending on the deity of course. But that doesn't need to take them to serve the church, even if many of them would be inclined to.
Similarly, rogue, druid or fighter might just as well want to serve a deity and take priesthood, anyone really. Who knows, maybe your warlock's patron is a god, god's powerful servant or an entity deemed as something you can use to serve your god - it all about flavour.