Sandy could tell Ryan was a smart kid that hadn't yet fell into 'the bad life' just yet.
But was definitely heading there. Sandy saw himself in Ryan and decided to help him just like somebody helped Sandy when he left home.
That's why the final scene of the show is so important. Now it's Ryan's turn to help someone that reminds him of himself.