When learning something new, concrete is good, abstract is bad. Abstract thinking is good in the next step, when you already know the topic. Screenshot are very concrete and makes understanding the text so much easier. You know that you are in the right place, your brain gets to connect the text to the program. The same goes for command line programs: provide some concrete examples of how to use the program, not just…
Text just assumes you are both looking at the same thing.
But with photos the user can realize there may have been UI changes that make the documentation you are looking at no longer accurate.