It is about respect, and anyone who heckles and protests at a funeral is very disrespectful and likely a total arsehole.
But it isn't illegal to be an arsehole, and if done respectfully and plainly in a non-violent way then that should be no problem; a part of the tolerance we all need to show in a civilised society.
The issue the police face I guess is in a threat to the peace, in much the same way that a placard peacefully slagging off Allah at a muslim clerics funeral would not purely be viewed as a peaceful protest, even if the act itself absolutely is.