TL;DR: Because the space around Io is full of large amounts of ionized sulfur produced by Io's many volcanoes.
There are an absurd number of volcanoes on Io, and they spew out an enormous amount of sulfur. The low gravity and thin atmosphere allows the ejecta to escape Io's atmosphere and reach space. As a result, Io's orbital path is like a donut-shaped cloud of sulfur dust (called a torus). Jupiter's super-powered magnetosphere pulls up more sulfur from Io's atmosphere itself, and ionizes all of this sulfur, making it stick to any neutrally charged surfaces in the vicinity.
Io's surface is riddled with volcanoes; the large red circle in the southern hemisphere is a ring of sulfur surrounding the volcano Pele (more images of Pele below)
Io, Volcanoes, and Sulfur:
The sulfur comes primarily from Io itself - specifically, the enormous number of active volcanoes (at least 400, at last count) that dot the surface of the moon. The abundance of volcanic activity on Io is primarily the result of the tremendous tidal forces caused by Jupiter's immense gravitational pull.
A small sample of some of Io's known volcanoes
Several volcanoes produce plumes of sulfur and sulfur dioxide that climb as high as 500 km (300 mi) above the surface. Io's surface is also dotted with more than 100 mountains that have been uplifted by extensive compression at the base of Io's silicate crust... Most of Io's surface is composed of extensive plains coated with sulfur and sulfur-dioxide frost.
Jupiter's moon Io, as photographed by the Galileo probe. The varying colors are mostly different kinds of sulfur (photo's colors altered to better represent what Io would actually look like to the human eye).
Io's volcanism is responsible for many of its unique features. Its volcanic plumes and lava flows produce large surface changes and paint the surface in various subtle shades of yellow, red, white, black, and green, largely due to allotropes and compounds of sulfur.
One of Io's best known volcanoes, Pele, and the ring of sulfur it has produced (for a picture of a massive plume of ejecta coming from one of Pele's eruptions, see below)
Not only is the surface of the moon covered in volcanic sulfur dust, the atmosphere is full of sulfur spewed out by volcanic activity as well:
When the twin probes Voyager 1 and Voyager 2 passed by Io in 1979, their more advanced imaging system allowed for far more detailed images. Voyager 1 flew past Io on 5 March 1979 from a distance of 20,600 km (12,800 mi).
Shortly after the encounter, Voyager navigation engineer Linda A. Morabito noticed a plume emanating from the surface in one of the images. Analysis of other Voyager 1 images showed nine such plumes scattered across the surface, proving that Io was volcanically active. This conclusion was predicted in a paper published shortly before the Voyager 1 encounter by Stan Peale, Patrick Cassen, and R. T. Reynolds. The authors calculated that Io's interior must experience significant tidal heating caused by its orbital resonance with Europa and Ganymede (see the "Tidal heating" section for a more detailed explanation of the process). Data from this flyby showed that the surface of Io is dominated by sulfur and sulfur dioxide frosts. These compounds also dominate its thin atmosphere...
The escape velocity (the speed necessary for an object to leave an astronomical object) of Io is relatively low1, because its gravity is only 1/6 that of Earth's, and the atmosphere is very thin (Earth's atmosphere is roughly 200,000,000 times denser than Io's). Taken together, these facts mean that when a volcano on Io erupts, the plume of ejecta can easily escape the atmosphere and enter space. By way of comparison, if we somehow moved the famous "Old Faithful" geyser from Yellowstone National Park to the surface of Io, it's plumes of water would reach heights of ~37 kilometers (23 miles) - compared with its actual height of 106-185 feet (32-56 meters) here on Earth.
Enormous volcanic plumes on Io, leaving the atmosphere and spraying out into space (the third image shows an eruption from the volcano Pele2, the subject of another photo posted above):
Volcanic plume on Io rising 330 km (210 mi) above the surace of the moon
Io, Jupiter, Magnetospheres, and Flux Tubes:
In real life, there is something known as a "flux tube" between Jupiter and Io.
A flux tube is a generally tube-like (cylindrical) region of space containing a magnetic field, such that the field at the side surfaces is parallel to those surfaces. Both the cross-sectional area of the tube and the field contained may vary along the length of the tube, but the magnetic flux is always constant...
As used in astrophysics, a flux tube generally has a larger magnetic field and other properties that differ from the surrounding space. They are commonly found around stars, including the Sun, which has many flux tubes of around 300 km diameter. Sunspots are also associated with larger flux tubes of 2500 km diameter. Some planets also have flux tubes. A well-known example is the flux tube between Jupiter and its moon Io.
This particular flux tube contains a significant amount of ionized sulfur:
An electric current of five million amperes flows along Io’s flux tube. It connects Io to the upper atmosphere of Jupiter, like a giant umbilical cord. The plasma torus is centered near Io’s orbit, and it is about as thick as Jupiter is wide. The torus is filled with energetic sulfur and oxygen ions that have a temperature of about 100 thousand kelvin.
Source: Seven Wonders of the Gas Giants and Their Moons By Ron Miller
Jupiter's magnetic field - or magnetosphere - is obscenely powerful:
The stronger the magnetic field, the larger the magnetosphere. Some 20,000 times stronger than Earth's magnetic field, Jupiter's magnetic field creates a magnetosphere so large it begins to avert the solar wind almost 3 million kilometers before it reaches Jupiter. The magnetosphere extends so far past Jupiter it sweeps the solar wind as far as the orbit of Saturn.
- University of Colorado at Boulder: Laboratory for Atmospheric and Space Physics
Schematic of Jupiter's magnetosphere and the components influenced by Io (near the center of the image): the plasma torus (in red), the neutral cloud (in yellow), the flux tube (in green), and magnetic field lines (in blue).
This overpowered magnetosphere sucks up gas and dust from Io's atmosphere at an absurd rate of ~1 tonne per second. The material - predominantly oxygen and sulfur - is ionized by the enormous amounts of electrical energy (400,000 volts, 3 million amperes, and about 2,000,000,000,000 watts - roughly equivalent to all the electricity produced by humans) thrown off by Jupiter.
Some of the ionized sulfur is actually caught in Jupiter's magnetic field and drawn back to the gas giant, where it strikes the gases at Jupiter's poles and causes aurorae:
Ionized Sulfur and Discovery One:
When the film begins, a mission is being arranged to reach the Discovery One, which ran into trouble in 2001: A Space Odyssey. Time is of the essence, because the derelict spacecraft is adrift and will soon crash into one of Jupiter's moons - namely, Io. NASA is clearly interested in finding out what happened to Discovery One and her crew, and because the ship is about to be smashed to pieces, they have to get there in a hurry.
The fact that the ship is going to crash into Io implies that it is probably in an unstable orbit around Io. This would mean that the Discovery One has been floating around in the flux tube for several years, surrounded by the massive clouds of ionized sulfur.
It wouldn't even need to be this close, though - studies of one of Jupiter's other moons, Europa (also an important plot element in the movie), have found that there are chemical reactions taking place on Europa's icy surface. These reactions involve large amounts of ionized sulfur and oxygen, and it is thought that the sulfur and oxygen on Europa were originally spewed out by Io's volcanoes.
The ship would be likely to accumulate a coating of sulfur dust from being relatively close to Io, regardless of other factors. However, our own real world spacecraft - for example, the International Space Station - are designed in such a way that the hull is essentially "grounded" to prevent massive problems from electrical charge buildup.
The grounding of the space station's photovoltaic arrays (the negative end of the arrays are grounded to the structure) place the ISS at large negative electrical potentials (-160 volts DC) relative to the ambient space plasma when the arrays are producing power.
In order to avoid sputtering and to lessen other undesired results of this grounding scheme, plasma contactor devices in the hull emit a steady stream of plasma from the station to raise its potential to within a few volts of the ambient plasma.
The plasma contactor acts as an electrical ground rod to connect the space station structure to the local environment and harmlessly dissipate the structure charges. GRC engineers designed, manufactured, and tested the hollow cathode assembly, which performs this function by converting a small supply of gas into ions and electrons and discharging this stream to space. The stream carries with it the excess electrons that created the surface charge.
We might assume that the Discovery One employs some form of hull grounding as well.
If so, then the ship would become a veritable magnet, actively pulling the ionized sulfur to its hull, much like an electrostatic paint spraying system.
An electrostatic paint spray system is a highly efficient technology for the application of paint to specific workpieces. Negatively charged atomized paint particles and a grounded workpiece create an electrostatic field that draws the paint particle to the workpiece...
Because the charged particles are attracted to the grounded workpiece, overspray is significantly reduced. Paint particles that pass a workpiece can be attracted to and deposited on the back of the piece. This phenomena is known as "wrap".
"Would this (likely) happen to a ship orbiting Io at a comparable altitude for a similar amount of time, out-of-universe?"
Probably. The only spacecraft that have been through the flux tube and torus where the sulfur is most abundant are long-distance, one-way probes like the Voyager and Galileo probes. We obviously can't see them to check the hull's color, but Voyager 1 ran into some problems in the flux tube:
As noted by Scudder et al. , within the Io plasma torus where electron densities ne exceeded 1000 cm -3, the spacecraft charged to a negative potential. When the spacecraft becomes negatively charged, the return current relation used by Scudder et al.  is no longer valid, and some other other means must be used to estimate ne and the spacecraft potential Φsc.
- University of Colorado at Boulder: Laboratory for Atmospheric and Space Physics
Considering the fact that the probe became so negatively charged that the instruments no longer function properly, and when the negative charge was acquired by flying through ionized sulfur, chances are the probe picked up a coating of sulfur - and that's just from passing through the area for a few hours, not lingering there for years.
When a spacecraft spends nine years floating around in a cloud of ionized volcanic sulfur, it's going to end up covered in yellow, foul-smelling dust.
1Earth's escape velocity is ~11 kilometers per second; Io's is ~2.5 kilometers per second
2The largest plumes produced by Io's volcanoes are called "Pele-type plumes" because Pele's eruptions are so enormous. Pele-type plumes can reach heights of 300-500 km (190-310 mi). A plume 500 km high is about 1/7th the diameter of the entire moon; by way of comparison, if Earth's volcanoes produced plumes with a height equal to 1/7th of its diameter, the plumes would be 1,820 km (1,130 mi) high. The ring of sulfur around Pele is 1,000 kilometers (620 mi) wide - about 1/3 the diameter of the moon; this would be like a ring of sulfur 4,247 km (2,638 mi) wide on earth - about the size of the United States.