I know Great Wall is useful to defend enemies on land, but is there any record that people had ever tried to beat Great Wall by digging tunnels under it? If not, why didn't it happen?
Most of the great wall was never assaulted, was more symbolic than anything. Most of the rest only ever had to deal with small groups of roving/semi-nomadic brigands, not organised armies.
And to tunnel under something like the great wall in such a way as to not draw attention to your efforts you'd need a pretty large group of tunnelers, and start at a considerable distance from the wall.
Another factor to consider is that a lot of the wall (and all the pieces that were actually potential targets for larger invading groups) were/are situated in mountainous areas. You'd have to tunnel through solid rock, not soil. While easier to hold a tunnel, it also is very hard labour, especially without heavy machinery. You'd end up with a tunnel that'd not be capable of infiltrating a sizeable force quickly, meaning you'd have to make it even longer to end up in an area where the defenders are unlikely to see you emerging and setting up camp for days or weeks in order to get all your forces through the tunnel before starting the assault.
For the problems faced with tunneling assault tunnels that have to remain undetected for extended periods, look at North Koreas tunnels across the DMZ, and at Hamas' and the Mexican drug cartel's tunnels into Egypt, Israel, and the USA.
The DPRK uses heavy machinery to make tunnels large enough to drive tanks and trucks through, which takes years for each tunnel to complete. And the South Koreans have got pretty good at finding and destroying them.
Hamas and the druggies make narrow, dank little tunnels that often you can't even walk through but have to crawl. And those too are often detected and destroyed quickly. They too have powertools, but no heavy construction equipment.
For a militarily viable tunnel you'd need the DPRK style, and without bulldozers, dump trucks, and pneumatic drills you'd need a lot more time to complete them. Not a viable solution (taking 10 years to build your tunnel? Easier to go raid another neighbour...).