I have the same experience... writing SQL code. When I'm programming, say in Python, I still see, in my mind, some manipulation of abstract concepts.
When I write SQL, it feels like the code pops in my consciousness magicallyfor me to lay down. This also means that I can very much explain and justify why I wrote Python code the way I wrote it, but I can't do that for SQL, I can just show that it works.
I am experienced in both, and I feel I write both with the same ease, I don't think it's due to me struggling with programming.