It can still go to the stolen phone. This is why:
When you send a text to 123-456-7890 via iMessage, Apple server looks up in its database for the number 123-456-7890, and find that 123-456-7890 is associated to a phone that has iMessage service.
At this point, the background color of your "Send" button on your iMessage turns from Green to Blue, indicating that when you press it, it will go out as a internet message using data, NOT a SMS text using cellular network.
iMessage then send your text as an internet message (not SMS), via Apple's server, to the iMessage application on the phone with 123-456-7890's account. However, in Apple's database, it keeps data for which device the number 123-456-7890 is associated with, NOT presently which phone has the 123-456-7890 sim card. While they often are the same phone, it wouldn't be in the case of a sim card removal.
Apple presumably set it up this way so iMessage can (and really should) work SIM card-agnostic. In other words, if you want to remove the SIM card from your phone, you expect it to still work over wifi. Let's say, if you go to a foreign country and you replace your SIM card with a local sim card, you still expect your iMessage to arrive in your phone via the internet. This is why it's important to not associate iMessage account to a phone number, but merely using the phone number as one of the two account name identifiers (the other one being the email address).
Now, let's say there is another number, 555-555-5555 that is a Samsung phone that can only receive SMS.
When you send a message to 555-555-5555 using iMessage, iMessage will again verifies against Apple server whether 555-555-5555 is associated with an iMessage account. Since it doesn't find it, then your text remains "Green" color, and will send as a regular SMS.