Why do they do that test for your field of vision?

Many reasons. Field of vision tests are designed to check for abnormalities in your vision that may not be noticeable otherwise. Certain diseases have a particular pattern of field loss (ie glaucoma) and can help with diagnosis.