The covers are ultimately commissioned by the editors, but typically after a conversation with the writer about what will be in the issue in question. But those covers typically need to be done sometimes months before the issue in question is written, sometimes before multiple issues are written, so sometimes things can change along the way.