What is the purpose of cat in "$ cat lakes.txt | sort > sorted-lakes.txt"?

I can’t understand why I have to use the cat command in this line: “$ cat lakes.txt | sort > sorted-lakes.txt”. Is it not the same as just “$ sort lakes.txt > sorted-lakes.txt”?

https://www.codecademy.com/courses/learn-the-command-line/lessons/redirection/exercises/redirect-sort