Hallo there,
sometimes there are strange bugs where e.g. a chest is locked in singleplayer, but the singleplayer can't open it. Or if you are admin of a server and you need to test some ACL-like features, then it is always great to know what your name is.
So a simple command names /whoami just returns our player name.