Is this a limitation of the STL file format or a limitation of Freecad?
It's a limitation of the file format.
A clever program could import such triangles and separate objects by finding all triangles that are in something I would call the "connectivity hull".
As long as the combined triangles don't form non-manifold surfaces FreeCAD is able to split the single mesh into its components. When you import an STL with several objects and go in the context-menu to "Display components" you can graphically see the different objects. At the moment there is only a way via Python to split a mesh into several components but a GUI command is missing.
This is only partially true. STL-Ascii can describe multiple solids, STL-Binary not. But most programms ignore this. It works like this
I don't know if this is officially supported. At least the article on WP does not mention it that an ASCII STL can have several objects: https://en.wikipedia.org/wiki/STL_(file_format)
The only format I know that intentionally supports several objects is OBJ.
I've just tried exporting as an AST and as a Wavefront Obj file and in both instances, Freecad combined all the meshes into one homogeneous blob...
There are two OBJ exporters. One is from the Mesh module (Alias Mesh) and the other from the Arch module (Wavefront OBJ). You must use the former.