Neither is a real collection. They are virtually constructed by the core engine (synthetic collections).
The ``ansible.builtin`` collection only refers to plugins that ship with ``ansible-core``.
The ``ansible.legacy`` collection is a superset of ``ansible.builtin`` (you can reference the plugins from builtin through ``ansible.legacy``). You also get the ability to
add 'custom' plugins in the :ref:`configured paths and adjacent directories <ansible_search_path>`, with the ability to override the builtin plugins that have the same name.
Also, ``ansible.legacy`` is what you get by default when you do not specify an FQCN.
So this:
..code-block:: yaml
- shell: echo hi
Is really equivalent to:
..code-block:: yaml
- ansible.legacy.shell: echo hi
Though, if you do not override the ``shell`` module, you can also just write it as ``ansible.builtin.shell``, since legacy will resolve to the builtin collection.