It feels weird that this creates the directory, and it violates the principle of least astonishment as it's surprising that this creates a directory when you just request the path. This is related to #1706 which was fixed in #1706.
I think I remember why this was added: It was so that if the user added code to use an include or data collection we would make sure the directory exists, however, this is not obvious, and seemingly randomly creating directories is not intuitive. The performance impact is small, but not negligible (~0.3ms)