It turns green when the message is sent over SMS, not when you text a "non-Apple device".
You can send SMS messages to Apple devices, from an Apple device, if you're not signed into iMessage, or they're not, or if your data connectivity is limited, or theirs is.
This! I got sick of iMessage, and I disabled it completely on my iPhone. Everything was SMS, and it made moving my sim card between devices easier. I found that if you don't explicitly turn off iMessage before you ditch your iPhone, no other iMessage users will be able to message you. All my messages were green all the time.
You can send SMS messages to Apple devices, from an Apple device, if you're not signed into iMessage, or they're not, or if your data connectivity is limited, or theirs is.