As I understand it, Ford built the B series trucks.
Yes the B series were built by Ford, not sure if it's all years, but my '99 was built right up in Edison NJ at the same place my '97 was built. You may have found some differences. Mostly they are the same except for the badging, grill, stuff like that. But when you start looking at mechanical parts, they're all Ford. And even though the '97 and '99 are different gens, the dash is identical. There is tons different in my 2 trucks but that's primarily because they are different gens and different models.
The Mazdas phased out in '09 (vs '11 for Ford) and actually the '09's were '08's leftovers. I've even seen some Mazda sold as '10's but I'm pretty sure there was no such thing.
Interesting thing about the Mazda B4000 in the last years they were loaded with skids etc basically an FX truck. Limited colors. It was a different approach than Ford where there were a zillion ways you could get things, the B4 just pretty much came with everything (4.0L, 4x4, etc). So they could be a nice truck, problem is, not many were sold compared to Rangers so you don't see many decent ones out there (at least I didn't).
I think the build quality is equal to Ford - after all - Ford built it with Ford parts on contract to Mazda.
I'm surprised the splining would be different.