I believe beg is used flippantly to make it clear that the speaker is being facetious
Nah, I looked it up after I made the post.
"I beg to differ" was meant as a way to politely disagree with a person who is an authority figure (elders, teachers, clergy, etc etc). You’re asking their permission to interject with an opposing viewpoint.
(that was the original intent, obviously it is used differently today)