This relates as much to UX patterns as it does to operating system patterns.
When you learn a bit of Swift, you realize it's not about "hiding the bottom navigation", but actually about using a different form of presentation for the content you're about to show.
If you're designing for iOS, Apple describes it best in the iOS Human Interface Guidelines:
Ideally, people can interact with iOS apps in nonlinear ways, so it’s best when you can minimize the number of modal experiences in your app. In general, consider creating a modal context only when:
• It’s critical to get the user’s attention
• A self-contained task must be completed—or explicitly abandoned—to avoid leaving the user’s data in an ambiguous state
Here's another good reference, also from the Guidelines, which gives some insight into why Instagram decided to use a modal view:
Use a modal view when you need to offer the ability to accomplish a self-contained task related to your app’s primary function. A modal view is especially appropriate for a multistep subtask that requires UI elements that don’t belong in the main app UI all the time.
But keep in mind: different programming languages (e.g.: Android) may implement patterns and presentations in different ways.
If iOS is your choice of platform, I highly recommend you take your time to read the complete iOS Human Interface Guidelines, and maybe even learn a bit of Swift yourself. Understanding how the system works and its limitations will greatly help you understand the best decisions for specific use cases.