I think the most simple answer is just "magic", and ignorance:
For one, during the last few centuries "magic" that was previously widely accepted to exist "disappeared" as science somewhat took its place. The coffee machine you use every morning would have been clearly "magic" just a few hundred years ago. But is it magic to you? - So, whatever advanced we encounter daily in our time was definitely magic in ancient times.
From there, it's only a small step to saying that there used to be magic in ancient times which is now gone.
And here comes ignorance into play. Through historical records, pictures, paintings, films,... 111
we (believe to) have a pretty clear picture of what the world, and life, was like a hundred years ago. Or two hundred years ago. But the world of, say, 3000 years before our time is much less documented and thus by itself quite mysterious.
So we have a world about which we don't know much, where the existence of magic was wide-spread common sense, from which we may find a rare artifact.
Or, seen more pragmatically, if, as a world builder, we want something magic, where do we take it from in the most plausible (or easiest) way? How about a mysterious world which we have no access to, where magic is a common thing and from which artifacts can reach us without too much hassle (compared to, e.g., extra-terrestrial devices or things from the future)?
One could have some character craft something akin to magical in our time, but that is harder to make plausible because people have a grasp of what technology today can do. So instead of trying to create a somewhat credible background about why or how man's current capabilities enable something magic-like without violating what people know you can just take an artifact from some place about which the common person, or everybody, knows little except that it definitely exists.
(I deliberately used the present tense above to describe ancient times, because w.r.t. the (desired) effect the ancient world is a mystical world, perceived like a place you just can't go to.) 111