Most file systems aren’t trees, most are some more flexible graph. You can get away thinking of them like trees as long as you’re not writing a correct program. (see also: links, bind mounts)
Trees have a formal definition that precludes this, that’s why we call them trees and not graphs.