I actually like the “Han-gets-his-name” scene because of one aspect: the imperial officer shows a small amount of compassion to Han. Out of pity he gave Han a family name.
During his service on Corellia the imperial officer must have met a lot of miserable people. And maybe because of that he did not became a callousness soldier of the empire, but rather a tender-hearted officer that has to deal with a lot of desperate people who want to join the army of the empire.
IMO that scene adds to the atmosphere and world-bulding of Corellia. It expands the Star Wars universe just with a small dialogue.