Because this is ISO 8601 date format, the standard date format that intentionally uses dashes to not confuse 25/01/22, 01/22/25 and 22/01/26 which are the same date in different formats
(that's why it uses dashes for dates, as for why it uses / for interval I have no idea)
Thanks for linking that. I’m a big proponent of using ISO 8601 but had either missed or completely forgotten about it specifying a format for intervals.
Note that ISO also permits a double hyphen as the interval separator which is hugely preferable to me personally and also works with file names (as mentioned in that Wikipedia article)
I know ISO 8601, but that doesn't answer my question. Let me rephrase this, why was a format intuitive to a machine chosen instead of a format which feels more intuitive to a human?
I think YYYY/MM/DD - YYYY/MM/DD will mean the correct thing to many more people than YYYY-MM-DD / YYYY-MM-DD, which I suspect many will interpret as an OR and not a RANGE.
Personally I think it goes a little over-flexible on support for non-strict formatted dates to the point it becomes difficult to figure out what a given date string is going to result in rather than feeling easier to use. That's probably part of the reason the primary example uses the clearer format.
(that's why it uses dashes for dates, as for why it uses / for interval I have no idea)