Creating a class object just based on the class type
The common argument for preferring one over the other for a dictionary (map) look up and a conditional (switch) look up is performance over maintainability.

The dictionary look up usually makes it easier to separate concerns. It also makes the code more concise and arguably more readable when invoking the factory functions.

The conditional look up avoids traversing a map and any types of indirection allowing for arguably faster access to object creation. It also avoids the overhead of creating the map/registering functions in the map.

There are also arguments for locality of reference vs. dependency management where the switch statement may keep object creation local to the call site, while the map approach passes off creation to a function or object that knows how to better handle the problem.

These are the typical arguments that I see for each of those different approaches to this problem.