This makes sense for Toyota. Sales of all small cars are down and the old Yaris is about dead by the sales figures. Now there is plenty of confusion with two completely different cars being called Yaris, one of the (ahem) way better than the other. Simplify the lineup, get a consistent brand name item, and have a highly ranked sub compact without confusion. People won't mind the Mazda thing in general, especially when they drive it.
I wanted the Mazda hatch when I bought my 2019 Yaris sedan, but now just love the sedan. It will be cool to see both Mazda/Toyotas side by side next fall, yet both may vanish if they don't start selling. Corolla may become their only small car.Maybe having been picked as a 2019 Top Ten car by Consumer Reports will help it along.
I have one, and it is same platform as Scion iA, 2017-18 Yaris iA, and 2019-20 Yaris sedan. Only sold hatch for 2020 in US. Got mine in March 2020, and a few months later car, whole Yaris line was dropped. When new, I hardly saw any 2020 sedans for sale, but at least 4-5 hatches per dealer.
Anyway, the Toyota based Yaris hatch, based on old Echo platform, was dropped after 2018, after a restyle. So, there's been 2 one year hatches; 2018 and '20.