To be fair, the Bafang and TSDZ2 are not the same. The TSDZ2 contains a torque sensor that built into the spindle/axle. So the torque sensor, spindle, bearings and shell has to be accommodated into a bottom bracket shell that's only 34.8 mm in diameter. Defenders of the TSDZ2 argue that this is the only mid drive motor on the market that achieves this. (afaik)
Better quality or more expensive motors (e.g Bosch) have a custom frame and dont have this 34.8 mm restriction.