Showing up for the funeral still doesn't change the fact that Gotti, ange, and the whole crew felt like Paul was gonna whack them imo
That is the main and maybe only reason for Gotti killing Castellano. If not for wanting to protect Ruggerio, Gotti may have been content to stay a captain.