nitrogen is often used to flush out any remaining flushing chemical along with the oil and contaminates. it's really dependent on the flushing agent used and it's instructions. it's also used to remove air which contains moisture that will react with the oil forming acids and sludge. during brazing it is used to keep air (oxygen) out of the lines to keep the copper from oxidizing.
while vacuuming will remove the bulk of the air it does take a long time to remove moisture or other condensables. think of water in individual molecules. there is nothing in a vacuum other then the waters own vapor pressure to push the water molecules down the line. the more that evaporate the colder it gets and the lower the vapor pressure. on small systems or appliances you can warm up the lines with a heat gun to help drive off the water. in a home system this is almost impossible. in larger systems a deep vacuum can be hard to obtain or take excessively long. nitrogen introduced into the lines to pressurize it will help move those moisture molecules down the line closer to the vacuum pump as the nitrogen won't condense.
it's definitely possible to do it without nitrogen but when opening up the system, doing a flush changing the oil and brazing in a compressor and filter dryer you are exposing the interior to a lot of potential air and moisture. you will need it minimally for filling the lines before brazing so if you have it may as well use it to flush the lines too