Use underscores in menu machine names Why cannot I use underscores in menu machine names?
For example menu_xpto is an illegal machine name for a menu.

What is the problem with using _ in a machine name?
Menu has an inconsistent pattern for machine names with most other parts of the system, that was simply not unified when converted to use the config system.

There is no reason, but it also can't be changed now as existing menus would then be invalid.