It was out of gratitude for Peter saving his life
“That’s what is cool — he gets a moment of redemption and he gets to
protect Peter, even though Peter would never know. It’s his way of
saying thank you.
It was a really interesting thing in the development of the story. You
couldn’t just rely on the tropes of the villain being a murderer and
killing a bunch of people. He had to be redeemable in some capacity in
the end and that he believes everything he said, especially about his
family. So it was a really fine walk to create a villain that still
has that moment of redemption in the end.”
SPIDER-MAN: HOMECOMING Director Jon Watts On That Surprising Mid-Credits Scene
Note that Toomes, for all of his flaws and bluster isn't actually motivated by evil.
Feige: “I think it is different from the other credits sequences. I think
people are conditioned to look for a forward facing tease about what’s
to come. But that’s not always, maybe not even half the time, what our
gags are about. Certainly, the one at the very end of the movie is
clearly not that. But this was basically just meant to show that
Toomes was not a horrible guy, had found himself in this position, and
realized this kid saved his daughter, this kid saved his own life. He
wouldn’t even be alive if it wasn’t for this kid. And in that moment
where he had the opportunity to rat him out and have a guy go after
him, he decides to keep the secret, because he appreciated ultimately
what Peter did for him. He is one of the few villains to survive a
movie, and I think you appreciate it.”
Kevin Feige and Jon Watts Discuss the Credits Scene