We are not told why. Perhaps they were sent secretly so that the Israelites wouldn't know about the spies. If they return with a negative report, then the people won’t be discouraged like their ancestors were (Numbers 14:1–45) because they won’t know what the spies have said.1 Alternatively, the secrecy could refer to the spies having to make sure they are not found out by the people of Jericho.
1 And Joshua the son of Nun sent two men secretly from Shittim as spies, saying, “Go, view the land, especially Jericho.” And they went and came into the house of a prostitute whose name was Rahab and lodged there.