Shadow visits sonic's house when he feels unwell, bewildered or lost. It is an involuntary action of seeking comfort when he needs it most. It has been repeated several times, and each time, Shadow becomes more comfortable with physical contact or small talk, but even so, he has yet to explain to Sonic what keeps him awake at night.