A cross licensing agreement is a swap of access to companies patent portfolios: in essence it says "you can use my patents and I can use yours". Cross-licensing agreements eliminate a huge amount of litigation expense, because a company that enters into cross licensing agreements with its main competitors can neither sue, or be sued by, those most likely to hold patents that matter to its business.
It also means that companies that participate in cross-licensing agreements simplify R & D, as they have less need to work around competitors' patents. A particularly important aspect of this is that it greatly reduces the risk of accidentally infringing patents by reinventing something that has already been patented. Accidental infringements are common enough to be widely deliberately exploited through the use of submarine patents).
In certain industries, especially high tech ones, major players tend to have such large patent portfolios that they cannot practicably avoid infringing each others patents. This means that any attempt to extract royalties for using patents is met with counter-claims. This makes litigation expensive, very uncertain, and, even when successful, unlikely to be very profitable after expenses have been paid and counter-claims settled.
Cross-licensing also has the desirable (for the companies entering into them!) effect of erecting barriers to entry that makes life difficult for new entrants. Consider the position of a new entrant in an industry in which the established major players have all cross licensed patent portfolios to each other. Without its own extensive patent portfolio, the new entrant is likely to be forced to pay royalties to all its major competitors, greatly increasing its costs.