What is the purpose of mentioning the genealogy of Christ? Why are there two different lineages?

It is not unusual for an important person to have a lineage, especially if that person is Middle Eastern like Christ. Lineages have goals