Explain the concept of soil compaction and its importance in civil engineering projects. Provide examples of situations where soil compaction is necessary and discuss the potential consequences of inadequate soil compaction?