This is false.
Apple doesn’t actively discourage anything. Apple put all of options in the operating system for a reason and ships with a Terminal.
The GUI allows regular people to get shit done without requiring them to be experts.
Meanwhile, developers, hackers, tinkerers, can tweak to their heart’s content on the things that matter to them while getting the benefits of the Apple ecosystem. It’s never been an either/or.
Editing a config file on Linux isn’t inherently “better” than doing the same on macOS.