### Summary

There is an undocumented gotcha in path_join. It is probably just a side effect of os.path.join's behaviour.

For a sparse backup task I had two tasks:
```
- ansible.builtin.file:
    state: directory
    path: "{{ (backup_dir, item) | path_join }}"
  loop: "{{template_dirs}}"
- ansible.builtin.copy:
    remote_src: true
    src: "{{item}}"
    dest: "{{ (backup_dir, item) | path_join }}"
  loop: "{{ templates | map(attribute='dest') }}
```
`template_dirs` is a list of relative paths, `templates.dest` is the absolute path of the destination config. For the first task, path_join resulted in `/tmp/somedir/directory/in/list`; for the second, it produced `/directory/in/list/filename`. `(backup_dir, item[1:]) | path_join` produced the expected result of `/tmp/somedir/directory/in/list/filename`.

The documentation for the path_join filter should be clear that a list entry with an absolute path overrides earlier elements in the list, and there should be an example of it doing that.

### Issue Type

Documentation Report

### Component Name

lib/ansible/plugins/filter/core.py

### Ansible Version

```console
$ ansible --version
ansible [core 2.15.2]
  config file = None
  configured module search path = ['/home/rorsten/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/rorsten/miniconda3/lib/python3.11/site-packages/ansible
  ansible collection location = /home/rorsten/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/rorsten/miniconda3/bin/ansible
  python version = 3.11.4 (main, Jul  5 2023, 13:45:01) [GCC 11.2.0] (/home/rorsten/miniconda3/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

Ubuntu 16.04, 20.04; MacOS 12.6.7

### Additional Information

It is not unreasonable to expect that the output of list | path_join would be the concatenation of all of the path elements in the list, but this seems not to be the actual behaviour. The clarification could prevent quite a bit of frustration.

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
passlib_mapping = {
        'md5': 'md5_crypt',
        'blowfish': 'bcrypt',
        'sha256': 'sha256_crypt',
        'sha512': 'sha512_crypt',
    }
    hashtype = passlib_mapping.get(hashtype, hashtype)
    unknown_passlib_hashtype = False
    if PASSLIB_AVAILABLE and hashtype not in passlib_mapping and hashtype not in passlib_mapping.values():
        unknown_passlib_hashtype = True
        display.deprecated(
            f"Checking for unsupported password_hash passlib hashtype '{hashtype}'. "
            "This will be an error in the future as all supported hashtypes must be documented.",
            version='2.19'
        )
    try:
        return passlib_or_crypt(password, hashtype, salt=salt, salt_size=salt_size, rounds=rounds, ident=ident)
    except AnsibleError as e:
        reraise(AnsibleFilterError, AnsibleFilterError(to_native(e), orig_exc=e), sys.exc_info()[2])
    except Exception as e:
        if unknown_passlib_hashtype:
            
            
            choices = ', '.join(passlib_mapping)
            raise AnsibleFilterError(f"{hashtype} is not in the list of supported passlib algorithms: {choices}") from e
        raise
def to_uuid(string, namespace=UUID_NAMESPACE_ANSIBLE):