Presumably it got it’s wish granting motives from whoever created it or otherwise constructed the notion of the wish granter genie.
Why would there be some creating agency involved any more than we need a “whoever” to explain where human characteristics come from?
Why would there be some creating agency involved any more than we need a “whoever” to explain where human characteristics come from?