A store needs an app as soon as logic has to be protected or has to run outside a page view. That covers credentials for an ERP, pricing rules nobody should read in the browser, interfaces in the Shopify admin, scheduled jobs and rules in the checkout. Anything that is pure presentation and works with data already in the store belongs in the theme.
The line follows the data. A badge, a filter or a new section on the product page is a task for Shopify development. Discounts, shipping rules and payment methods with logic of your own run through Shopify Functions and checkout UI extensions, and both require an app. Our Shopify checkout page shows what is possible there.
Extensions are the parts of an app that appear inside Shopify: blocks in the admin, theme app extensions in the storefront and, on Shopify Plus, extensions in the checkout. They sit at positions Shopify provides, so they keep working when Shopify updates the platform. We use them in place of direct changes to theme or checkout code.
Before development we define the permissions. Every app receives access scopes that determine which data it may read and write. We limit them to what is necessary and document webhooks and stored data. Extending the permissions later has to be approved in the store again.