Wow. Looks quite bad, actually. That shit's going to be right through your engine block too. Thankfully the only moving parts it will impact are the water pump and thermostat, but it could block smaller galleyways - I don't know if the D22 turbo is water cooled like the D40, but it's something to be concerned about, along with the major one - the radiator cores themselves. A flow test is needed.
As to where it came from, who knows? Someone poured some shit in there at some point just to piss you off? Were you 4x4ing, clogged the front up with mud after getting a hole, it sucked the shit in? Metal corrosion from inside somewhere?