It's a hack, because you're abusing the structure a bit. An Allegro path is a vector of path components, eg: "usr", "share", "mygame". Then it has a filename: "img.png".
When you call al_path_cstr(), it joins them together with the delimiter you supply.
So if you add something like "foo/bar" via al_append_path_component() or al_set_path_filename(), you are putting two pieces together in a single slot of the vector.
It doesn't really matter in that when you call al_path_cstr() you'll get the same result. However, you cannot traverse each component individually now, since Allegro will treat your "combo" component as a single entity.
I doubt the functionality will ever change, so it should be safe to use.