Perhaps Israel wanted to imply it was them. Perhaps Israel wants Iran to retaliate. I wouldn't be so quick to judge what exactly is going on...because maybe in fact...it just was deliberate. There is something psychological warfare...heard of it? I highly doubts it's illegal and would ever get Barak in trouble.
Russian ministry: Turkey suggests joint working group over Syria ops (Reuters)