Why Does the Magical World of Harry Potter Reject Modern Amenities?

The wizarding community in the Harry Potter universe lives, in many cases, alongside the muggle community. Despite the close proximity to these two worlds they seem to be completely unaware of the happenings of each other. While there is a small amount of crossover between these communities, through muggle borns and some squibs, the wizarding community actively tries to hide from the muggle community, out of fear that they would be taken advantage of or attacked for their abilities. Even with this separation one would expect that at some point wizards would have come around to modern inventions like electricity and radio. Why does the community reject most modern inventions and what does it do for the story to have the wizards live in a more medieval world?

Historically speaking it makes sense that wizards would have separate from the rest of human society sometime during the late medieval period. During the late medieval period there were cases of people being prosecuted for practicing witch craft. In fact, King James I of England even wrote a book on how to correctly identify and prosecute witches in 1597 called Daemonologie. While witches and wizards were already trying to separate from the muggle community, Hogwarts was founded in 990ad and had charms put on it to turn away muggles, the events of the late 16th century would have of course caused them even more fear of the muggle community.

The idea of a wizarding community purposefully separating themselves from the muggle one makes sense, but why does J.K. Rowling have them reject most muggle advancements of modern times. By placing it in the medieval period Rowling is allowing the reader, primarily children for the first few books, to escape their everyday lives. This relies on the idea that the middle ages were somehow and easier time and that the invention of modern utilities has complicated our lives. It also allows the reader to use their imagination and pretend to be in a world outside their own, escapism. Putting the medieval period into the modern world is perfect for the escapism because it allows the author to pick and choose which parts they want to bring, which in this case was almost exclusively the positives while leaving the negatives.