Keith Block, the co-CEO of Salesforce, said on Monday that he had "some healthy skepticism" about buying MuleSoft before his company acquired the software business for $6.5 billion in March, its largest deal ever.

MuleSoft's technology helps companies connect data that's stored in disparate systems, some in the cloud and some in legacy on-premises software. It's a very different market from Salesforce's core business of providing customer relationship management software to salespeople and selling other cloud products to employees in marketing and services.

"We looked and said, this is integration software, what does that have to do with CRM?" Block said on Monday, in an on-stage interview at CNBC's Capital@Work Summit in San Francisco. CRM and communicating directly with customers is "what got us to where we are," he said.

Marc Benioff, Salesforce's other co-CEO and the primary founder, has long touted Salesforce's rapid expansion, calling it the fastest-growing enterprise software company to reach $10 billion a year, and on pace to be the quickest to $20 billion. While Salesforce has made other big acquisitions over the years, they've typically been for related cloud-based software and applications that serve additional types of businesses or divisions within a company.

For example, the 2016 purchase of DemandWare for $2.8 billion gave Salesforce a product for managing online commerce, and the $2.5 billion deal for ExactTarget in 2013 provided Salesforce a tool for email marketing.

Block said the "aha moment" for him with respect to MuleSoft came when a Fortune 100 financial services firm brought its entire management team to San Francisco to meet with Salesforce.

With top leadership from both companies sitting around a table, the bank was looking for ways to go faster in its "digital transformation," Block said. According to Block, the bank's chief information officer said what was holding the company back was, "We can't get data out of our legacy systems."

"That's when it dawned on me that integration can be very strategic," Block said.

Salesforce shares have climbed about 15 percent since the MuleSoft deal was announced on March 20.

"Some of our best ideas come from our customers," Block said.

WATCH: Salesforce buys MuleSoft for $6.5 billion