Either empathy or the free rat wants to have sex with the trapped rat, while it's eating it's chocolate.

Seriously though, as anybody who has had a pet rat knows, rats are very friendly and social even with humans!