It really is a big deal, because, for any object allocated in a stack, when it is about to go out of scope, i.e. when we are about to hit the closing brace "}" the destructor gets called automatically, this is the crux of RAII idiom
See the example of RAII pattern usage in unique_ptr here, https://cppnuggets.hashnode.dev/uniqueptr-a-gentle-introduction
Many library classes implement RAII pattern, so we are able to use clean code which follows value semantics in our application, unique_ptr is one such example, std::unique_lock is another such class which follows RAII pattern to initialize and release mutexes