### 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
''' takes a list of dicts with each having a 'key' and 'value' keys, and transforms the list into a dictionary,
        effectively as the reverse of dict2items '''
    if not is_sequence(mylist):
        raise AnsibleFilterTypeError("items2dict requires a list, got %s instead." % type(mylist))
    try:
        return dict((item[key_name], item[value_name]) for item in mylist)
    except KeyError:
        raise AnsibleFilterTypeError(
            "items2dict requires each dictionary in the list to contain the keys '%s' and '%s', got %s instead."
            % (key_name, value_name, mylist)
        )
    except TypeError:
        raise AnsibleFilterTypeError("items2dict requires a list of dictionaries, got %s instead." % mylist)
def path_join(paths):
    ''' takes a sequence or a string, and return a concatenation
        of the different members '''
    if isinstance(paths, string_types):
        return os.path.join(paths)
    elif is_sequence(paths):
        return os.path.join(*paths)
    else:
        raise AnsibleFilterTypeError("|path_join expects string or sequence, got %s instead." % type(paths))
def commonpath(paths):