I always wondered why more stores didn't do this. I had Best Buy have another store ship directly to my home when phones I wanted to buy weren't available in the local location, Bealls Florida fulfill an online order from three different retail stores, and I think I read a while ago of Walmart planning on doing this to fight Amazon Prime 2-day shipping but, otherwise, any online order would come from some warehouse somewhere no matter how many or few retail locations that company had near me. Your friend's experience of companies trying (and mostly failing, obviously) to build such capability inhouse would help explain this.
Such capability would also help retail customers by improving the accuracy of in-store inventories that appear online.