Do you know, were they ever profitable?
This can be quite hard to establish, especially for companies that have raised significant capital (Shopify raised $120M+), they can keep that from happening for a long long time.
For companies that have not raised significant capital, if they're able to finance their growth out of their income stream then yes, they can convert to profitable overnight.