As an example, in the Kitties tutorial :
#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum Gender {
Male,
Female,
}
Why do we use Serialize and Deserialize given that the implementations are not compiled when building the WASM runtime?