There are several ways to approach this aspects of Nick's behavior. We can list them one by one. It's possible:
Nick is motivated by the deeply placed empathy he developed for Gatsby seeing himself as the only person who got "close" to Gatsby.
Nick feels pity for Gatsby who in death is abandoned by the shallow society crowd he infiltrated.
Nick does what he has since he met Gatsby: he attends to the funeral without serious question to Gatsby's needs like before when he hosted tea for Daisy to allow Gatsby to "meet" with her.