Recommendation is based on physics. More tread depth = more water being displaced. A mismatch can therefore affect grip.
https://www.rac.co.uk/drive/advice/tyres/checking-tyre-tread/#:~:text=Tests%20by%20UK%20technical%20organisation,be%20as%20much%20as%2044%25.