I agree with you both, if operator variant already set the apn, this shouldn't be here.
My guess is that this code has been here for a long time without revision or second thoughts, while the rest of the code (e.g. variant) was changing, so I should blame myself for this.