The ZX Focus is a great car... handles well, good mileage, sporty engine. There are also more of them on the road than the Mazda3, and many more dealers and repair shops than Mazda has, so repairs should be easier. The ZX 3 and 5 also share many parts (both for repair, and aftermarket) with the rest of the Focus line.
I've never driven a Mazda3, so I really can't compare the two.