system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does mayonnaise act and taste the same as butter if you fry it on a grilled cheese sandwhich?

My grandad taught me this trick when I was like 7 and old enough to make a grilled cheese, and it was like magic to me, and is still really, I just thought about it and I really don’t know any food chemistry so naturally brought me to reddit to seek out my tasty answer.
gpt
Mayo is fat + egg.

Butter is fat + water.

The fat does all the work, so you should have a somewhat similar thing here, you're just cooking mostly fat onto bread.

And yes, if you're wondering, you can make homemade mayo, and yes its just oil and egg (although you're welcome to throw some extra stuff in for flavor)