Let me add that the risk can be more subtle than your bare-bones example. Take this example:

[user@server ~]$ sudo rm -rf directory_to_delete /*

The accidental space between the directory_to_delete and the /* means that it's going to operate on both the directory_to_deleteand/*, the root folder, as the root user. And it's going to do it recursively, so there goes your OS install.

That's why you need to be extremely careful when using rm -rf, especially with sudo.