Esri's documentation on the size of items in Portal is missing quite a few important footnotes. At best, the documentation is misleading.
When an item is loaded into Portal, a item.pkinfo file is created along with other files. The file holds metadata about what is being loaded into Portal, including size information. I haven't dove into the weeds enough to know whether Portal is creating the file or the client creates it and passes it to Portal, but I think the latter.
For GIS services hosted in Portal, e.g., feature layer, map image layer, etc..., Portal does not communicate with the data stores to determine the size of the GIS service. The size value that shows up in Portal and through REST appears to be nothing more than what is recorded in item.pkinfo. If a GIS service is created by uploading another file to Portal, like creating a feature layer from service definition file, the size value for the GIS service is inherited from the size value from the service definition file.
For tools that create a GIS service directly without uploading a file to Portal first, like Copy to Data Store with GeoAnalytic Server, there is no size value to inherit so it seems to get set to -1 which gets converted to 0 KB.
Data size can be tricky if one wants to split hairs. The same data set stored as a shape file will be larger than when stored as a feature class in a file geodatabase, and a feature class in a file geodatabase can be smaller or larger on different systems depending on cluster sizes of file systems.
For GIS services hosted in Portal, the important take home is that the reported size information does not reflect the physical size of that service in the data store. At best, the size value returned approximates the size of the GIS service in the data store, and at worst it is simply wrong.