MySQL allows a flexibility, by auto-interpreting various delimiters, and converts them to proper date[time] format. It is well explained in documentation:
MySQL permits a “relaxed” format for values specified as strings, in
which any punctuation character may be used as the delimiter between
date parts or time parts. In some cases, this syntax can be deceiving.
For example, a value such as '10:11:12' might look like a time value
because of the :, but is interpreted as the year '2010-11-12' if used
in a date context. The value '10:45:15' is converted to '0000-00-00'
because '45' is not a valid month.
The only delimiter recognized between a date and time part and a
fractional seconds part is the decimal point.
So, in your case, MySQL is considering the delimiter as ---
, and thus implicitly converting to Y-m-d
format.
However, it is always better and safe to use the standard Y-m-d h:i:s format, to represent a date/datetime value.