Why not use Blueprints to load UMG widget and add to viewport

Completing the Changing UI Input Modes lecture and I’m wondering why we are adding the widget and setting the input mode with C++. Seems like it’s all much easier to do in Blueprints and if you want to get a reference to the menu widget, we could just pass it right into the Game Instance.

Are we doing it in C++ because we want more practice at C++? Or because this is actual best practice to do in our own games?