Value of input.step on illegal value for step attribute

Consider this code

const input = document.querySelector('input[type="number"]');
console.log(input.step); // Outputs: "foo" in Chrome/Safari/Firefox
console.log(input.getAttribute("step")); // Outputs: "foo" in all these three too
<input type="number" step="foo">

I can understand why getAttribute returns foo since that’s expected as there’s no validation performed but why does input.step yield foo. The spec reads so (emphasis mine)

if the rules for parsing floating-point number values, when they are
applied to the attribute’s value, return an error, zero, or a number
less than zero, then the allowed value step is the default step
multiplied by the step scale factor.

and the default step is 1. So why do all the major browsers deviate from the standard? Am I reading the spec wrong or is there some other reason to this behavior?