On the surface level, it is simply a straightforward combination of two wish-fulfillment fantasies.
As to why the overpowered Isekai trope has become popular, this is a much more complicated question. While it is difficult to give a scientific source for this, a oft-cited reason is the societal disenfranchisement experienced by young Japanese, the typical target demographic of such material. With the effects of the decades-long post-bubble economic stagnation still present, general societal hostility towards the Yutori generation (ゆとり世代), along with many other reasons that are too complex for me to talk about knowledgeably, there is a general sense of defeat and estrangement toward modern society that pervades a significant portion of Japanese youth. This translates to a desire to escape, rather than try in vain to be successful in the modern world. (Note this trend isn't limited to Japan, but I am limiting it to Japan to keep it on topic.)
Isekai is pretty much the embodiment of the escapism espoused by this urge, and anime (and related material such as manga and LNs), often being a form of escapist wish-fulfillment to begin with, was very receptive to this shift. It effectively rode the wave to end up with the current surfeit of Isekai works.
Now, Isekai in and of itself does not always imply a desire to escape - it may be a method to explore questions about history, or a way to put into perspective the effects of modern societal and economic development. However, the recent popularity of Isekai really isn't concerned with such questions - it is much more about the MC, typically self-inserts, being successful, rich, popular, etc. by virtue of:
- Experiences as a typical member of modern society (You will often see the MC heralded as genius for having what would be basic knowledge (e.g. economic concepts or cooking methods) in modern times)
- Having nearly omniscient knowledge of a fictional world (common in Isekai involving novels)
- Having access to modern technology in a pre-modern world (In Another World with My Smartphone, anyone?)
- Having some method to easily "level up" and gain new powers (common in game-based Isekai - note that they often involve overpowered MC-only skills, items or classes)
- Or being bestowed powers without reason or any meaningful effort (as given in OP's question)
Note that none of these require any exceptional effort on the MC's part. Having a overpowered MC in an Isekai makes it easier for the reader to get their success-without-effort (or at least, a gamelike success-proportional-to-effort) wish-fulfillment fantasy, which has been in demand with the increasing disillusionment towards the idea "effort breeds success" in modern society.
I've talked in length about why the "Overpowered MC in Isekai" trope appeals to consumers, but a equally, if not more, important aspect is its attractiveness to creators.
Isekai is a very convenient tool for creators, as one can simply apply whatever technology level, society, etc. is convenient for the plot. Unlike, say, the setting the story in the actual medieval times, the faux-historical setting often seen in Isekai means no real research is required, and any dissonance within the verisimilitude of the fictional world can be hand-waved away. In addition, in figuring out the MC and their skills and knowledge, the creator can just directly apply their own experience without further thought or research.
Now, while it would appear at first sight that it would be a simple matter for a MC with all the typical knowledge of the modern world to quickly become successful in a world that can be bent for plot convenience, this really isn't the case.
Anthropological development is not discrete, and for an MC to succeed in a pre-modern world, the writer often has to either; make the MC more knowledgeable than the typical reader (or writer!), or force a contrived lacuna in common knowledge of the Isekai that makes little ethnographical sense.
To give a more concrete example, say that an Isekai is set on a typical pre-gunpowder society, and the writer wants the MC to take over the world by building guns. This would require the MC to know how to manufacture gunpowder, machine intricate metal parts, smelt high-quality steel (or some other suitable metal), and have to ability to raise funds and the manpower to build the parts necessary. This simply isn't the case for most of the audience, becoming a impediment for self-insertion, and also requires the writer to do research, which a lot of Isekai writers can't frankly be bothered to do.
Implementing or applying even a sliver of modern development to a pre-modern society almost always requires a lot of preexisting groundwork, which is both difficult for a self-insert MC to convincingly achieve, and a bunch of annoying research work for the writer.
Then, for an MC without any special powers to become successful in an Isekai, a clear but simple gap in development that any modern hoi polloi can fill is required. Of course, this also means it often makes little sense for the Isekai society to have not filled the gap, which also interferes with the reader's suspension of disbelief. Some examples from my memory: the approximate equivalent of 12th century europe that hadn't realized heat can be used to cook food, or a Baroque era world that did not have the concept of currency.
So, it is difficult for an Isekai MC without special powers to achieve success, at least without some narrative concessions. The obvious recourse, then, is to give the MC special powers. After all, why bother building a gun workshop when you can just conjure guns out of thin air? Or better yet, shoot magic out of your fingers? Giving an Isekai MC special powers makes crafting a logically consistent story much easier - the writer is not constrained by pesky notions such as the limits of human capability or mundanity of the everyman, and can insert contrivances as necessary to keep the story going with the excuse of "special powers".
In short, an overpowered MC sidesteps what is perhaps the Achilles' heel in Isekai fiction writing - that the modern average Joe is no more inherently skilled or knowledgeable than a premodern human (or human equivalent) society.