The difference is that Aldo punched KZ's shoulder on a miss. He didn't intentionally punch his shoulder, but it dislocated it.
That is a fluke injury.
Also, Aldo specifically attacked the dislocated shoulder when he realized, which is pretty dirty. He could've easily just threw left hooks at his face and still gotten the stoppage because the ref would realize KZ can't defend from that side.
For Weidman, while he didn't intend to break his leg, he did intend to use the knee check, which he knows will hurt the opponent and possibly break their leg.
Completely different circumstance.