There are two pots in play here, so if you think about each pot then it makes the finish order obvious. Also, a point of technicality: all 3 players are not all-in. Only Dealer and SB are, BB's tourney is not at risk in this hand.
Main Pot = 15K (all 3 players, 5K each)
Side Pot = 14K (BB for his remaining 7K + SB's call)
First the Main Pot is awarded to SB, which knocks out Dealer in 3rd. That leaves SB and BB competing for the Side Pot, which is awarded to SB and knocks out BB in 2nd.