Even if so, everyone lives in the same market. If Apple has a contract for those chips at an artificially low price, it's to their advantage to sell them to someone else at market value instead of putting it in a Mac where they'd have to increase price (and take the PR hit) significantly to make the same profit.
That doesn't take into account the profit generated by selling the mac in itself
it's Apple and they don't like to adjust prices to the market
other companies would have just hiked the price of the 512GB model to reflect the lack of supply and to allow people who really need that model to pay for it dearly
but that comes with some PR damage that Apple would rather not deal with
Not if their margin on the completed product is higher than the potential profit on the memory.
My guess is they are doing this because they make more money selling two 256GB devices than they do on one 512GB device.