Packaging size compared to project size

Hello,
There is something I don’t understand about all of the packaging things.

My project game is heavy, about 300Go.
When I package my game for the client (I do a package for win64 by clicking on the file->package project->windows), the result is not heavy, about 10Go only.
Then, when I create the server files (by clicking on window->project launcher, and then click on the custom profile I created for linux), it is only about 3Go.

How does it works ?
Is the editor enough intelligent to know which files should be include or not ? I mean, it knows that this mesh is use so it include it ?

In this case, what about the server on linux ? I mean, it is normal that is is less heavy since there is a lot of things that are not necessary : for example it doesn’t care of how the table in the world look, but it also need some information in meshes, like for example character meshes. Even if it doesn’t display the player, it has to know for example which skeleton it uses or things like that ?

I am sorry if I am not really understandable… I am not a native speaker.

All the best