Ideally, is mined, then either stored somewhere dry, out of the weather, or delivered directly to the ship in a covered train/conveyor belt.
In reality, it's usually mined, then stored in a big pile outside in the weather for weeks/months until it's loaded. It won't pass the pre-loading transportable moisture limit (TML) tests, so they falsify the results.
A cargo with a slightly high TML can appear dry on loading, but the vibration causes the moisture to migrate down to the bottom of the hold and cause the cargo at the bottom to liquify. When the ship rolls, this layer shifts, and the rest with it.
Obviously, if the TML is way too high, the whole thing turns to slurry.