Similarly, (Exodus 20:22) "And im ("when") an altar of stones you make unto Me." It is mandatory. You say it is mandatory, but perhaps it is optional? (Devarim 27:6) "Of whole stones shall you build the altar of your Gād" indicates that it is mandatory and not optional.
If the Torah Is Saying If You Happen to Build a Stone Altar, Then
Mekhilta Tractate Kaspa 1:2