I have tried to clean up unused packages/software and I tried to remove telepathy but it also affects the empathy package which I use. That makes me wonder why empathy depends on telepathy and what does telepathy do. Could anyone or someone explain me this.
Telepathy is a framework for instant messaging. When you set up a chat account in the Online Accounts settings panel, you're setting up a login associated with Telepathy.
Empathy is a frontend for Telepathy. That is, Empathy provides a user interface for interacting with the Telepathy system.
If you wanted to, you could replace Empathy with another frontend to Telepathy and all your accounts would be there, because it's the same underlying framework. Empathy also does not do everything that Telepathy does - for example, IIRC, Telepathy provides a system to make phone calls, an ability that Empathy does not expose.