Yes. You are correct. The President does get to determine whether something should be classified or whether it is more advantageous to release the information.
Part of the job.
"The majority ruling in the 1988 Supreme Court caseDepartment of Navy vs. Egan – which addressed the legal recourse of a Navy employee who had been denied a security clearance – addresses this line of authority.
“The President, after all, is the ‘Commander in Chief of the Army and Navy of the United States’” according to Article II of the Constitution, the court’s majority wrote. “His authority to classify and control access to information bearing on national security … flows primarily from this constitutional investment of power in the President, and exists quite apart from any explicit congressional grant.”