Airlines and hotels had data about flights and available rooms. Kayak needed this data to show it in your search. This could happen in a few ways:
1. The airline or hotel could send Kayak data that had a particular format, and Kayak would deal with it. A common format, especially for hotels IIRC, was invalid csv files.
2. The airline could send its flight data to ITA, which standardized it across all airlines that used the service. ITA was a separate company from Kayak and Google flights and other flight search engines; it aggregated data but was not a search engine. [EDIT: was not primarily a search engine. See comment below.] Kayak would buy data from ITA.
3. The airline or hotel could decline to let Kayak list its flights/rooms.
Since then Google bought ITA, breaking the [EDIT: partial] separation between the most common flight-data aggregator and flight search engines. (Which was probably good for competition; I was a little concerned about the merger.) And Kayak was bought out too, by one of its competitors.
Take all this with a grain of salt: this is what I remember from years ago, and it wasn't really my area. And I certainly don't speak for Kayak.