Why would my ex-boyfriend contact me after not having seen or spoken to each other for 2 yrs?

Many possibilities. Your question suggests some suspicion or concern about his motives. Do you have curiosity about why he is calling? Any interest? Any worry? Does he want better closure? Does he just want to catch up with an old friend or is he interested in restarting the relationship? As dr. Ali wrote, only one way to find out!
Communicate. Have you talked to him? If you haven't, you may want to find out if you have talked to him and you still have strong feelings about the way you guys broke up then let him know that you are not ready for him to get back into your life.