Type "adb" to see all of the command syntax, options, etc.
When you type "adb shell" that tells adb (client) on your PC to ask the adb daemon on your Android device to present a shell prompt to you. Typing "adb shell" presents and interactive shell and typing "adb shell <shell-command>" sends the specified command to the shell and then quits (presenting you with the output first, of course).