Wow, I'd never even heard of the Azera until you mentioned it. It's not sold in Canada so I had to check out the US website. That's a nice car. It's already basically as you said, a fancier Sonata.
I suspect the reason the Azera exists for the US is that the Sonata is still marketed as a reasonably priced family sedan, with the base model starting in the low 20K range. So it would be a tough sell to market a luxury Sonata and ask $32-$36K for it. Consumers won't accept that. They would just see it as an over priced Sonata with a bunch of added option to jack the price. But make a slightly different model and call it the Azera and BAM, luxury model that is easier to sell, but not so fancy that it hurts Genesis Sedan or Equus sales.