What is the purpose of prospecting ore rocks in RuneScape?
In the past there was no difference in appearance for when a rock was mined or if it had ore. With prospecting you could determine if it was mineable.
They never removed this feature after a rock would turn grey when mined so that new player can use this to learn what color can be associated with what ore.
Reference: RuneScape Wiki
While it may be obvious to you now which ores an ore rock may give, this was not always the case. Prospecting a rock was the only way in the early days to find out which ore a rock gave before mining it. If you did not have the mining level to mine that rock, you could not find out which ore the rock gave.