Identify Sales price from the product info.

I am working with Shopify products, and I recently discovered that some stores store sales prices in the variant compare_at_price, while others store them in the variant price. Why do different stores have different rules? What would be the best way to solve this issue uniformly?