I initially thought that the S-400 deployment by the Russians as well as the basing of sophisticated air-superiority fighters in Syria was triggered by the shooting down of the Su-24 by the Turkish Air Force.
The Russians wanted to make clear that they would not allow this to happen again.
I have read that the shoot-down of the Su-24 was ordered by Erdogan-opposing generals within the Turkish armed forces and actually caught Erdogan off-guard. After the coup rumors also emerged that it was the Russians that tipped off Erdogan about the commando raid coming to capture/kill him and apparently the people who were responsible for the Su-24 shoot-down were purged (the coup fraction was particulary strong with the TAF and it seems that many TAF officers were purged after the coup).
It is interesting that Erdogan apologized for the shoot-down only weeks before the coup took place and apparently investigations/arrests were going on at that time concerning the shoot-down in Turkey
Since the coup Erdogan and Putin have been best buddies. Thus it is interesting that the Russians are reinforcing their SAM capabilities in Syria. Either they want to send a clear message to the US or they want to test it against US aircraft? Or are they afraid of something else, perhaps Israel intervening? The Syrian Army has received reinforcements/material by the Russians and one could speculate that the Israelis are worried about the Syrian Army (if the Assad regime survives) may get their hands on sophisticared Russian hardware when the whole mess is over? Perhaps advanced short range ballistic missiles, like the ones the Russians have also deployed to Syria?