Core remap files, how the heck they work?

i thought it would be similar to the config file, but seems I’m wrong like i have every single button on my mega drive core remapped but the remap file is only this:

input_libretro_device_p1 = "1"
input_player1_analog_dpad_mode = "0"
input_player1_btn_l2 = "10"
input_player1_btn_r = "2"
input_player1_btn_r2 = "11"

where is the rest? and i can’t even make sense of the sintax, this just looks like I’m setting physical buttons to the retropad(and ones i don’t even use noneless). but it does seems it is saving the actual retropad -> core remaps i set. so wth is going on?