Loose granular structures stabilized against gravity by an effective cohesive force are investigated on a microscopic basis using contact dynamics. We study the influence of the granular Bond number on the density profiles and the generation process of packings, generated by ballistic deposition under gravity. The internal compaction occurs discontinuously in small avalanches and we study their size distribution. We also develop a model explaining the final density profiles based on insight about the collapse of a packing under changes of the Bond number.