For me it's trust. Even a great product or service and feel sour when you do not trust the company. Just look at what has happened to twitter. It literally got x-ed out. Trust is gone, people leave.
I stay loyal to a brand when it consistently delivers quality, aligns with my values, and makes me feel seen as a customer. Great service, genuine engagement, and a product that solves my problems keep me coming back.
For me it's all about reliability and consistency. If a brand consistently delivers quality products that meet my needs and don't let me down, I'll stay loyal to them long-term. Good customer service and standing behind their products helps too - brands that make things right on the rare occasions there's an issue earn my loyalty. But yeah, quality is key - if the product starts going downhill, my loyalty goes out the window pretty quick.