A security breach of Uber Technologies Inc. temporarily hobbled the ride-hailing company’s internal communications in one of the starkest illustrations of how tech companies with access to the best talent and tools are vulnerable to repeated compromise.