This can happen, but it's better to avoid it. In this case, you could have avoided it by writing your tests in a different order.
1) foo exists;
Red because of course foo doesn't exist. Write an empty foo(); now it's green.
2) foo throws a TypeError if the argument is something other than string.
Red because foo never throws a TypeError (or anything else). Have foo unconditionally throw a TypeError; now all tests are green.
3) foo strips out the a's.
Red because it doesn't. Now implement; now all your tests pass, and all of them started out red.
It seems like a contrived approach, and of course it is, and it's not easy to know in advance how to write the tests to adhere to red-green-refactor. But the more you do it, the easier it becomes.
Red-green-refactor really is important and worth trying to follow, because if a test starts out green, it may not be testing anything meaningful about the system under test. Sometimes, as in this example, you bump up against it; you can tweak the system under test to force a red, but also try to learn from it (as you are doing by posing this question) so it goes better next time.