How could the pilots in mecha anime move their mechas fluently with just primitive controllers? What's the reason why in many mecha anime like Macross, Gundam, Code Geass, Tengen Toppa Gurren Lagann, Kakumeiki Valvrave, Darling in the Franxx and RahXephon, the pilots could move their mechas like the mechas are an extension of their own bodies?

We always see the pilots in the cockpit room with some "controller". But the controllers seem to only have basic functions to allow basic movements such as move forward and backward, turn left and right and such. But in the actual scenes, the mechas could do more than just move squarely, e.g. skillfully dodge the opponents' bullets.

In anime like Neon Genesis Evangelion, Star Driver or Tengen Toppa Gurren Lagann, it could be explained away that because the mechas and their pilots are synchronized through the mind, they could do these "acrobatic" movements. However, with anime like Gundam, Macross, Suisei no Gargantia, or Kakumeiki Valvrave, it doesn't make sense...
In-Universe Explanations

In the Gundam franchise, this is explained through the use of advanced computer systems that translate simple joystick motions into complex robotic motions. According to in-universe theory, a human that's working within a bipedal, robot-like machine is able to work most effectively when the machine's movements mimic those of the human body, especially since those movements often balance it efficiently (such as how the legs and back move when you stretch out an arm). As such, engineers design the machine to make those movements automatically as part of a commanded movement.

This principle has been extended to other anime franchises like Macross.

As you write, there are also mind-machine interfaces that translate human thought directly into machine movement.

Real World Explanation

The actual historical answer comes with the dawn of the giant robot genre in the 1970's. Real-life machine interfaces were relatively primitive back then. The average manga reader and anime viewer couldn't really imagine controlling a robot with anything other than joysticks and buttons, so that's what anime and manga artists drew into the cockpits of mecha like Mazinger Z and Getter Robo. They knew those interfaces wouldn't really be enough, but mecha series were cheap children's entertainment with a heavy emphasis on selling toys. It didn't matter if it was realistic, as long as it felt cool.

The boys (and girls!) who watched those shows grew up to make more recent mecha series, and often the unrealistic control schemes are tongue-in-cheek references to the silly controls they saw in those earlier shows. Fundamentally, they understand that making a control scheme realistic didn't matter back then, and doesn't matter now; it doesn't make your show any more or less popular.