What is the job of pericardium?

Theoretical. It theoretically prevents overstretching of the heart during filling but. Like your gall bladder, you can live a happy, productive, and symptom-free life without one!
Unknown. There'ss no definite, agreed-upon function. It generally is a passive structure, two wisps of tissue wrapped around the outside of the heart with a tiny amount of fluid separating them. Its role is usually just to be there, passively stretching as the heart expands so that it doesn't meet resistance. When pericardium stiffens of fills up with fluid, it can restrict this normal expansion.