There are many processes that do not run in a shell. For example, the init or systemd or upstart daemon does not run in a users shell, which is why a ? is displayed under the TTY column in the following example. The -A or -e or ax option can be used to view all processes.
[john.doe@server1 ]# ps -e PID TTY TIME CMD 1 ? 00:00:02 systemd 2 ? 00:00:00 kthreadd 3 ? 00:00:01 ksoftirqd/0 . . .