My understanding, which can easily be wrong, is that this behavior is correct. Quoting the Wikipedia page on STL:
STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture or other common CAD model attributes.
3D graphics formats are significantly more complicated and varied than people at first think. Can you provide a minimal example of the problem? STL represents "what is filled" by using normal vectors on each face. This is why you can use them for 3D printing for example. So I'm not sure a mesh object is naturally represented by the file format as anything but the filled boundary of the mesh.
Additionally, The STL and OBJ exporters were originally made for graphics, so I guess possible they don't have certain features that might be useful for meshes.