The issue is the bearing in these pictures. It goes in the center case of the transmission and splines into the output gear of the transmission and it helps support the geartrain. If any debris gets inside them it can grab the roller surfaces and pit the bearing. Because the transmission output gear is directly supported by the bearing it will make noise as the vehicle speed increases. The bearing is put in place and partially integrated into the surrounding case. There is an aftermarket process that you can sleeve the case and install a new bearing or you purchase a new case half from Mazda.
The first two pictures are the center case where the bearing is, on one side is the output gear, the other is the bearing in the case.
Third picture is the part of the planet the output gear slides over.
Last picture is the bearing itself, pitted rollers and damaged race.