Create apikey for user programmatically as admin

What problem is generating these keys going to solve? Maybe there’s another way and maybe knowing more will suggest a solution.