Why did my ex showed up to my grandma's funeral?

Hey.
My grandmother passed few days ago, and today was her funeral. And, my ex showed up, unannounced! (he never met her while we were together).
Then, my parents, who are on good term with him, invited him to a house where she lived, to join us! (it's a tradition here, to have a gathering with whole family in a house of deceased) . And he accepted!
I talked really little to him, and we shook hands.
He said he's sorry if he made me uncomfortable.
Now, he sent me a follow request on instagram.
Do you think there are some motives behind all of this, like getting back together?
Or is it straight out of "support" ?
(we ended relationship on a really bad terms by the way)
Why did my ex showed up to my grandma's funeral?
Post Opinion