I recommend you take some course on a decent university in logistics and stuff. Modern IS (Informations Systems) basically take almost all the pain out of that and the added cost of offering such a BTO option like RAM is next to nothing. These lot of small costs as you call them are really really small. So small in fact that you can pretty much ignore them.
Ummm I am the GM of Logistics and Supply Chain IT for a large company, I have worked with and studied supply chains and inventory management systems for companies such as Best Buy, Kohls, Target, Kodak, Avon Products and logistic companies like Ryder, TNT, the former Excel, UPS, Penske Logistics and major ocean carriers, and mfg companies like Flextronics, Cat and Komatsu just to drop a few names....I have over 20 years logistics and supply chain on my resume and hold a Six Sigma black belt. Now that I have established I know what I am talking about, and do not need some university course to tell me the how and why inventory moves, its bottlenecks and the COGS associated with exceptional inventory, what I said was there ARE incremental costs, however small to BTO options that it is not 100% profit, but you are paying for the ability to have Apple install and warranty the memory, but the cost is not a wash. There are costs for inventory carrying, management, ordering and secondary mfg line considerations, so the cost to Apple for a BTO is slightly higher than a standard unit.
While it is true you can buy the ram cheaper yourself, if you had infact went to a third party to procure, stock, install and warranty the ram, it WOULD not be cheaper than doing it yourself either. That third party would charge you cost of labor, plus profit on that labor and the money costs for procuring and managing that inventory, in addition you would be paying up front a prorated cost of risk to warranty that inventory and the installation job. While all of those costs are small at a per unit level, they are costs above and beyond the cost of the ram itself.
Apple, while charging far more than a third party is in fact incurring incremental costs for the BTO and is passing those costs on, plus profit to the consumer. No other way to say it, anyone that posts that it is 100% profit by Apple, doesn't understand supply chains, MFG, inventory management and associated costs.