RALEIGH, N.C.—The world’s two most valuable technology companies—Apple Inc. and Amazon.com Inc.—are shopping for cities in which to build new corporate campuses. But with one of them, you would hardly know it.

Apple Chief Executive Tim Cook this month met secretly with North Carolina Gov. Roy Cooper to discuss possibly putting a major new customer-service facility in the Raleigh-Durham area, according to a person familiar with the meeting. The undisclosed meeting was tucked into Mr. Cook’s very public agenda, which included...