Bleed air comes from the engine compressor, and is quite hot (~300C). If the bleed air ducts ever leak, this hot air is a serious fire risk; the bleed air valves are there to shut off the bleed air to stop this from happening. This is why the bleed air valves form part of the fire protection system, and close during the test.
Bleed air is used for many different things including pressurisation of the cabin, fuel tanks, external fuel transfer, canopy sealing, G-suit pressurisation, gun gas purging, canopy anti-ice and some others I can't quite think of. It's cooled before being used for these things, of course!