They need to destroy the missile before it kills people using Gary’s computer but they don’t know if they trust him. They think he might lock the controls. Spock says something along the lines of “without facts we can’t use logic, we have to rely on human intuition”. With facts you don’t need to use logic. It’s when you don’t have all the facts that logic is the most useful.