There are several possible reasons for this.
The actor was so good they made them a regular, but their original character doesn't fit in the ongoing plot, as is often the case with disposable minor characters.
- Jerry Orbach played a minor role in Law & Order as a lawyer, but later was cast as one of the two main police officers (a leading role). This applies to a vast majority of leading actors in Law & Order; they often had a minor role at first.
- Peter Capaldi and Karen Gillan both played minor roles in the same episode of Doctor Who (The Fires of Pompeii), and would later return to play the two main parts (not at the same time).
- Mark Lenard played many roles on Star Trek as side characters, but ended up as an infrequently recurring character as Sarek (Spock's father). Part of what made him a recast actor was his skill at playing an alien-humanoid character, which requires walking a fine line between foreign yet recognizable. Not every actor has that skill.
Because there are only so many actors.
- Monty Python is embodies this principle. Moving from sketch shows to feature length movies, they ended up with movies where the 6 Monty Python members play countless characters. This is because the nature of their comedy (short disposable sketches) means that they can't fill a feature length movie with just 6 characters (it would get tiring really fast), and therefore chose to have the 6 actors play many short-lived characters.
- Law & Order is actually a really useful example here. Almost all main actors (in future seasons) had a minor role in the beginning. Every episode, there are multiple episodic characters. These characters only exist within a single episode, but they do get a fair amount of spotlight during this episode. This means that you need (at least) good actors. Given how many Law & Order episodes have been created, with "disposable" episodic characters that need to be played by good actors, and filming always takes place in the same location, there are only so many actors availaible in the region before you start recasting the same actors in new roles.
- If you also factor in variations of Law & Order (Special Victims Unit, Criminal Intent, ...), there is a massive amount of actors who have played multiple parts.
Because the director and actors often worked together. This is more common between different shows, where the same director tends to work with the same actors. For example, there are few Tim Burton movies that do not star Helena Bonham-Carter (Burton's wife) and Johnny Depp (who Burton likes working with).
But I've also seen it happen within the same TV show:
- Garret Dillahunt (Deadwood). Played a character who ends up getting killed about halfway through the show. David Milch just liked Dillahunt so much that he eventually cast him again as a completely different character (and I have to admit that Dillahunt is such a good actor that it took me a while to be sure that it was the same guy).
- Dan Hildebrand (also Deadwood) played a character who died in the first episode. In the last season, he was recast as another minor character.
And I also dont think they would do it because of the budget.
Yes and no. Assuming different actors with equal skill and cost are available, it seems reasonable to cast different actors for different roles (barring examples where the director is finding a role for an actor, instead of an actor for a role)
But budget indirectly factors into it. Background characters are a dime a dozen. You don't need any acting talent to be in the background. However, if the show has many disposable characters with significant lines (as is the case with Law & Order), then you're limitng yourself to skilled actors.
If you want to keep the actor wages down, you'll be hiring people who are local to where you are shooting, and there's only a finite amount of adequately skilled actors in your region. Therefore, you have to make a compromise:
- Lower your standards (= lower quality casting)
- Find actors further away (= higher budget costs)
- Accept that you recast actors (= you know they're good actors, and it's not exceedingly jarring if the actor isn't immediately reused for the next episode)
If you space the recurring actors' roles properly, the third option is (in my opinion) the best option. Lowered quality or increased costs can often lead to a show being cancelled (low quality = lack of viewership, high costs = lack of companies investing in the show), so you want to avoid them at all costs.