Because apples lightning is a shitty connector standard and they refused to switch to USB, because people will buy a new device more often when it breaks quickly.
If its actually the socket thats dead then its kinda hard to do anything, but maybe its the cable? You could also try hotgluing the cable in place if you just wanna experiment.