You might look into it to see if there’s something special about butter versus other oils/fats that may make butter specifically good for burns, but I understand that as keeping the air off of the burn, similarly to how oxygen tents work.
Today we apply petroleum jelly (Vaseline, Neosporin, etc.) over skin to help it heal, but butter is basically going to do the same thing of keeping in moisture.
I think the reasoning with topical coatings for burns is actually something to do with avoiding gases touching the burned area, which is why they use oxygen tents for people with severe burns over a large area. Petroleum jelly and other similar products block the air from touching the burn also.