These scripts have short cache expiration headers because they are updated frequently. When Facebook and Google add new features and fix bugs, they deploy these changes by overwriting existing files (the ones you linked to in your question). This allows users of these services to get the latest features without having to do anything, but this is due to the cost (as you indicated) of the need for short-term cache headers.
You could place these scripts yourself and set headers with a distant future on them, but this will require that you manually update them when changing libraries. This will be very time consuming and often impossible, because most of these updates are not published in the public change logs.
In addition, to do it yourself, perhaps, in the end, it can become a net loss of performance, because you lose the effect of the network cache that you get due to the huge popularity of these services. For example, I would suggest that when most users come to your site , they already have a cached version of these scripts (i.e. it is very likely that in the last two hours, the person who visited your site also visited another site using Google Analytics). On the other hand, if you posted your own version, visitors always had to download your version.
To summarize, I would not go down the road to fix this "problem". This will take a long time and probably will not give you the desired effects.
source share