I think that perhaps what has happened is you have a more modern wheel having a thru axle hub. Some manufacturers design the rear hub to accept the 4 major freehub body types as well as accepting different end caps so the wheel can be used with a thru axle or in a bike with conventional dropouts and a QR skewer. To make cleaning and swapping the freehub or converting axle standards as user friendly as possible, the rear hub of a such a system has end caps and freehub bodies that can be removed by hand. This works because what holds everything together is the securing of the thru axle into the frame (or in the case of a QR skewer, it's mating to the acorn nut on the side opposite it's entry). The cassette is still secured to the free hub body by the cassette lockring.
When the wheel is out of the bike on these types of hubs, one can oftentimes pull firmly enough on the cassette such that it will dislodge the end cap. This allows the cassette and freehub body to which it's connected, to come off the hub axle. It's designed to do that, albeit in a more controlled and expected situation. In fact, in hubs of this type, if the cassette and lockring has been removed in preparation for disassembly and cleaning of the internals, one may have difficulty getting enough purchase on the end cap to pull it off by hand. The trick is to replace the cassette and lock ring, and give the whole drive side assembly a tug--off pops the end cap and the free hub body/cassette comes along for the ride.
So, if you have this type of rear hub, the banging of the rim with the cassette side down, the momentum of the cassette and freehub body forced the end cap off and they kept going too. It's important to know what bits came out and that they've been replaced in the correct position. As others mentioned, a pawl could've popped out of its housing (I'd guess pretty rare in this situation), a toothed drive ring, a spring and a washer are all other tid bits that MAY* be contained behind the freehub body in these hubs and are essential to the health and function of the hub and need to be in the correct orientation.
*Different manufacturers, different designs mean different loose pieces depending. For instance, on a type Mavic rear hub, there will be a light spring, toothed drive ring, the axle and washer. A Hunt V2 rear hub only has a small washer in addition to the axle and freehub body that is part of the disassembly. A seal may come loose too but they're usually press fit into the hub or around the body firmly enough they stay in place. Incorrect seal orientation or not being fully set in their seat can be a source of friction or drag in the rear wheel.