`command` is a somewhat archaic but still widely used way to do what $(command) does, i.e. substituting the whole by the output of command.
If you remove the colon which is the 'no op' shell instruction, you are asking the script to execute the result of whoami as a command, which is usually not the case and trigger an error unless your username is reboot which then will lead to interesting side effects ...