A valid Bitcoin transaction is NOT the same thing as a valid use of Bitcoin.
People decide what Bitcoin is for, and adopt rules (via code selection) to enforce their wishes (run a node).
It's not the other way around. The code does not define what people wish for.
It attempts to!
This is why, "Oh it's a valid transaction, you should not stop JPEGs on bitcoin, you're a cEnsoRInG hypocrite!"
No, dickhead, all validation rules are cEnsoRInG rules.
Run Parmanode-Knots. It helps you filter and slow propagation of nonsense. Parmanode also helps you learn stuff so eventually you can build your own node without assistance.