In most cases, Fog Cloud is better than Darkness
Fog Cloud is a very good spell, but there are some instances I will bring up why it isn't 'the best' compared to Darkness.
Not every casting class gets Fog Cloud. Only Druid, Ranger, Sorcerer, Wizard, actually get access to Fog Cloud on their casting spell list. (It is a Domain spell for Tempest Domain Clerics). For example, a Warlock would have to go to Darkness for an area of effect blinding/obscurement.
Fog Cloud can be dispersed by a swift wind. This is a very niche situation, but it could come up. An enemy spellcaster could have access to an ability or spell to do this, you may be in outdoor conditions where this is likely, and a few other situations could cause this to become a problem.
Fog Cloud can't be seen through. While this is generally a benefit, there are some creatures that can see through darkness. This means that while Fog Cloud is generally better at a large area of obscurement, it still may be beneficial for a creature to cast Darkness so it can attack people who can't see through it. There are even some player features, like Devil's Sight, that allow them to see through Darkness as well.
There is a very niche scenario I've just thought of myself, but there may be times Fog Cloud isn't 'appropriate' for a certain situation. Fog Cloud creates fog, which may bring suspicion from enemies if they spot it in inappropriate areas (Inside, in non-foggy areas, etc). Darkness creates darkness, which may not create as much scrutiny. This is such a niche situation I find myself not considering this a 'benefit' to Darkness but I thought it important to point out. (The only situation I see this really working is: you are inside a building at night, you use darkness to hide yourself or to render a light useless. Someone who enters the room would possibly assume it is simply dark because there is no light, while seeing fog would possibly cause them to freak out. Like I said, niche).
Additional Control features: move darkness and turn it on/off
Being portable can make darkness more appealing in some situations, as is the ability to 'turn it on and off' - which you can't do with fog cloud.
If the point you choose is on an object you are holding or one that
isn’t being worn or carried, the darkness emanates from the object and
moves with it. Completely covering the source of the darkness with an
opaque object, such as a bowl or a helm, blocks the darkness. (Basic Rules, p. 90
If the object you cast darkness on is small enough, you can pick up the object and carry the darkness with you.
So why is Fog Cloud a 1st level spell while Darkness is a 2nd level spell?
There is not going to be a good answer to this aside from asking the game designers, but perhaps due to the ability to see through the darkness it necessitates a higher spell level, its portability, and the ability to (when cast on an object) turn it on and off, and it not being movable by the wind informs that level decision.
Why would a character who has access to both ever choose Darkness over Fog Cloud?
As discussed above, you probably will wind up taking Fog Cloud over Darkness. But the situations mentioned, high winds or an ally who can see through it, may change your decision.
Overall, I'd probably stick with Fog Cloud if my intention was to blind enemies and retreat while leaving Darkness to something for specific features and skills.
Does not being dispersible and having a niche interaction with Devil Sight (Amongst other abilities) justify being a level 2 spell?
This wasn't asked by the OP, but the conclusion drawn from the question and answer is that the ability to control the darkness, and the chance to move the area of effect by moving an object, may inform why darkness is a second level spell.