Here are my 2 cents:
Sine the very beginning of my gaming career (1984) making diagonal moves with Joysticks always has been a let's-call-it "tricky" issue ( to not use the f*-word............. frustrating). As shown on your photo, movement by a joystick was (and is) always done by 4 switches (left,right,up and down). In early times there have been even Joysticks working with just two pieces of metal per direction, being pressed together by moving the stick. The old Atari joysticks where "working" like this. Later on, the first Joysticks with so-called micro-switches where showing up and the most popular (and reliable) one was the "Competition Pro". With this stick, you where able to win e.g. every obstacle run in the game "Decathlon" and the joystick survived more than one game (and if one of the switches failed, it was an easy one to fix it or replace it by yourself).
Back to topic: When doing a diagonal move, technically two switches should be pressed at the same time by moving the Joystick.
A theory: One of the switches is (in most times) pressed milliseconds earlier then the other. So the program ("Game") is doing e.g. a move to the left instead an "up-and-left" (diagonal) and is not recognizing the sceond button being pressed shortly after the first one. Does this make sense ? Well it became a valid theroy for me after 32 years in gaming.
I remember games (C64 mostly) where diagonal moves are often being the thing costing you your last life before reaching the next savepoint (if there where any).
When I start with playing games in Retropie I soon found out that e.g. the 4-Way "Buffalo SNES" controllers I use, are also having a lack in reflecting diagonal moves. "Super Mario World" (or all 360-degrees games) was one game which is very hard to play with. Jump'n Runs like "Burger Time" or "Loderunner" where doing fine with 4_Ways( no diagonal moves needed so far).
I then lend one of the XBOX 360 controllers of my son , connect it to the Retropie and start playing games like "Super Mario World" and "Crash Bandicoot" with the analouge stick of the pad.
What to say: It works like charm !
I never liked the Xbox/Playstation controllers neither owned a console, because I grew up with the Atari/Logitech/Competition Pro sticks and 4 (up to 8) directions and two fire buttons for a game where also enough to deal with (in former times).
But with the Retropie, it has become the first time I used this controllers and they make absolute sense for playing 360-degrees -games.
There are still a lot of buttons to learn to deal with, but maybe I have another 32 years to learn :-).
So if you have a way to test a Xbox360 controller with your Retropie (after configuring it correctly - may need a little patience), I guess you also will not use any other controller anymore.
Give it a try and let me know the result.