SAN JOSE, Calif.—Apple Inc., one of the world's most secretive companies, is finding there's a price in pushing its grievances against rival Samsung Electronics Co. in federal court: disclosure.

In just the first few days of its patent trial this week, Apple has publicly discussed how it created the iPhone and iPad, showed early designs of the devices and described intimate details about its product team.

It...