As Raymon Chen explains the compatibility is not with CP/M but with an idiom that people still use today, namely of assuming that one can redirect to/from devices like NUL without a path prefix. There's an awful lot of existing practice that does this and doco that says that this is what to do.
Random example: Here are SuperUser answers written this year, only a few months ago, employing this idiom.
Random example: Here are SuperUser answers written this year, only a few months ago, employing this idiom.
* https://superuser.com/questions/1293489/