The $1000 plan covers a lot more than just an online store with a code. There's also a POS included, integrations with third party payment providers etc. Not everyone needs the most expensive plan. Also, the value of a Shopify subscription is not in the code to host an online shop but the ease of use with which someone can sell their wares online.
Yes, they do own the code but the question for most people using it is, do we need to own that code? Do we need to maintain it? or can we just focus on selling?
If someone stops paying Shopify, they still own the products that they were selling online, they can import an excel sheet on some another online store, upload the images and start selling. As long as they own the ___domain, selling on another platform would be easy.