The original reason why it is this way is that it’s made for markup and not code: When writing chapters of text, it is very natural to be able to use relative paths to include other chapters. Absolute paths with a leading slash provide an alternative, primarily useful for importing files shared across a whole project.
However, as you’ve noticed, neither of those two properly handle the case of relative paths passed to utility functions or of any kind of path passed into a package. To properly solve this, we need a path type that is separate from a plain string and that remembers where it was created. Ideally, this path would be supplemented by syntax since its much more natural for syntax to be file-dependant than for a path
function.
For more discussion on this, see: