When creating a website, you need a way to access files and resources. These files can either be local (inside the website folder structure) or external (from an address on the Internet).
With local files, placing them in separate folders is best to ensure the separation of concerns and modularity of your code. For files located elsewhere, you need an equally efficient way to reference them. File paths ensure that you can access these resources.