This is a requirement for a visa application- how many people applying for a US visa are on American soil?
Your status is granted (or denied) by a border agent, based on your visa, when you cross into the country. Changing one can be done on the US soil and the process does not require a visa. But if you want a visa stamp for a new status then you have to visit a US consulate and that requires leaving the US.