Yes I found this old issue on Github:

https://github.com/recalbox/recalbox-os/issues/914

It basically explains it: Mame buttons are inconsistently assigned and weird inside the mame drivers itself.

One would think that after decades of development, the Mame coders would have figured this stuff out and standardized it. But no...

At least is is correct in Finalburn.