Ideally the ticketed name is close enough to identify the traveller.
What matters most though is the API name, which can be different to the ticketed name. The DHS uses fuzzy matching on this, working from passport number and date of birth, but they still expect the name to approximate what they have against the visa, Green Card or ESTA.