I'm wondering if the shaft failed or even just cracked a long time ago, and someone decided that rather than replace it, they would weld it onto the rotor, as in "We can't have the elevator be down for weeks waiting for a new motor from Rueland, so weld it for now and we will order a replacement and put it in when it gets here...".
Then some bean counter said "Is it working now? Yes? Then no need to spend money on a new one..."
Side note: now that we know there is a mechanical brake, it's likely that there is something wrong with the brake system. Elevator motors must have very heavy duty brakes capable of stopping a fully loaded elevator in free fall. If the brake engages while the motor is still energized, you can definitely break the shaft.
" We are all here on earth to help others; what on earth the others are here for I don't know." -- W. H. Auden