Usernames are sort of like nicknames. People create them as a means of identification when they are creating accounts online. Some people, who do not like to reveal their actual name online, find usernames a great way for them to be identified by others without the need for their true identity to be revealed.
In the context of the video game world, usernames are often referred to as gamertags. They function the same way, as they allow users to display this name when playing games. Recent updates now allow users to reveal their actual names if they would rather people see their actual names.