I have had this problem (had an iphone, switched over to the android side of things), my girlfriend has an iphone and we had this issue a lot, and it has happened with several of her other friends as well. I don't believe it is an intentional bug, I think it's just hard to get iOS to stop sending imessages whenever someone switches to a different OS. Just my take
I didn't know this, had we (girlfriend and I), it would have made it almost a non-issue lol.