I don’t know how one “steals” a paper that is on Google Docs, unless it was a printout or the creator shared the link (and the content was stolen). So, unless he explains otherwise, we have to assume the OP/creator probably had some hand in this.
It is an easy trap to fall into. OP’s intention may have not been to cheat so much as to help a friend get his creative juices flowing, or get him out of a rut by showing him what the teacher was looking for. Once things are unleashed in cyberspace, however, all bets are off. As OP learned, there can be a fine line between helping and cheating.
Sometimes the best way to learn is to teach, so students shouldn’t be entirely discouraged from helping each other. That is, provided they are careful and know what boundaries not to cross. If a friend is stuck, go over it verbally, talk through ideas. Walk them through a math problem or briefly-talk-in-summary what topics they might write about in paragraphs one and two. But the only person who sees your “written work” should be your teacher.