You have stumbled into a pretty massive historiographical debate that once dominated Holocaust scholarship - "Functionalism" vs "intentionalism". More can be said, but /u/commiespaceinvader has written on this debate in the past here, as well as done a podcast episode.