It's basically to defend their profit margins. If it was a security issue, which they sometimes claim, they wouldn't sell tickets to people who walk up to the counter an hour before a flight leaves. They do, so apparently that gives them enough time to do whatever security checking they do. If that's enough time, changing a name a week before a flight can't possibly create any problems in this regard.