Xerox started the GUI fire. And it was getting out, even if Apple had never seen and used it. Xerox developers left and spread it to many places. GEM was an example.
There is a difference between research/experiment and commercializing a technology. Steve Jobs went there and got access to the GUI after giving Xerox access to stock options. Xerox wasn't going to give that to just anybody, including Gem. When Steve got that access and that was as a result of close connections through Jeff Raskins, Apple was already a billion dollar company. Xerox execs also didn't care about the GUI, it was just there as a research project; all they cared about was selling printers.
Steve Jobs said, they didn't even know the gold mine they were sitting on. Even the assistant who did the demo saw how foolish Xerox was at the time. It was until IBM introduced the PC and the Apple I and LISA, Xerox experimented with commercialization. Even then, the target market was companies and universities, of which only 20,000 were sold. You can sure bet, the cost was a factor which was in the ten's of thousands.
Apple started work on the GUI as far back as '79, Microsoft early '81. By the time Apple released the Macintosh in 1984, Apple was just announcing and starting serious work on Windows (Interface Manager). Apple would have at least a 5 year head start, while GEM wouldn't since it would be more of response to what Apple tried with Apple LISA although they came out a year later after System 1.