Optional attribute does not have to be supported.
If a BGP router does not understand this optional attribute, this attribute is removed if it is non-transitive.
I do not understand why MED belongs to this category?
I understand MED is optional attribute because it is not required to be included in BGP advertisements like 5 well-known attributes.
For non-transitive attribute, if a BGP router does not understand this optional attribute, this attribute is removed.
For routes with attributes ORIGINATOR_ID and CLUSTER_ID, receiving BGP router only passes them on to routers inside the same Confederation.
But I don’t understand why MED is non-transitive.
MED is non-transitive because it is only relevent to the AS you advertise it to. The AS that receives this MED advertisement should not pass this on to any other AS's because it has no meaning there.