How does MAME use the .ini files that I put inside of RetroArch

I was tinkering with MAME today and started to wonder about the MAME folder it creates in your system folder I remembered having to put the hash folder and the roms folder containing the software list folder in the MAME folder in order to be able to play software list games. So that made me curious as to what else I could add and then I found an old post from 2014 about being able to use these folder paths and that it would use your global and even driver based .ini files so my question is how does it work. I’m familiar with editing MAME ini files so what settings can I set that the program will actually use.

I think it works very similar to MAME official.

I’m not 100% on what retroarch honours, I would like to know because it’s hard to understand what’s possible sometimes

Yeah that is why I’m curious. I’m just tinkering with it right now because I usually just use the stand alone for MAME which says something for it right there most other stand alones I’m forced to use I wish they had a Libretro core to emulate them.