A bit strange that the teacher assumed that you hadn't authored it yourself.
A short anecdote.
I remember back in the late 1980'ies, I used to connect with BBS's and had online chat with friends. One guy used to write jokes and share with me and I would also share him the jokes I had written.
Then one day in class, another friend of mine who was also into BBS's, shared a list of jokes from our mutual online friend, and he read them out loud.
When I heard that one of my jokes was included, I mentioned that I wrote it (I didn't expect people to find it that funny).
The hilarious backlash was that some angry person started saying that I was trying to steal the credit for a joke that I myself had written some weeks before.
The moral of the story is that information is local. What people hear first will often impact their perception.
It's crazy how sometimes people just randomly assume that "oh that can't be him"!
Heh, it was a learning experience.😄
I think my friend had just assembled a list of jokes that he thought were good and he didn't claim authorship for all of them.
But as the jokes were presented, there was an assumption that he was the author of the whole list.
We have to go by what we see and as a result we will draw different conclusions based on our information.