CC's own FAQ addresses the reasons, which I find satisfactory, so I'm just going to reproduce it here and expand on the key points:
Unlike software-specific licenses, CC licenses do not contain specific terms about the distribution of source code, which is often important to ensuring the free reuse and modifiability of software. Many software licenses also address patent rights, which are important to software but may not be applicable to other copyrightable works. Additionally, our licenses are currently not compatible with the major software licenses, so it would be difficult to integrate CC-licensed work with other free software. Existing software licenses were designed specifically for use with software and offer a similar set of rights to the Creative Commons licenses.
Our licenses are currently not compatible with the GPL, though the CC0 Public Domain Dedication is GPL-compatible and acceptable for software. For details, see the relevant CC0 FAQ entry. We are looking into compatibility of BY-SA with GPL in the future; see the license compatibility page for more information.)
(Bold is mine)
That is, CC-BY-SA
- Doesn't mention source code
- Doesn't mention patents
- Isn't compatible with major software licenses1
Why are these good reasons for not using CC-BY-SA?
It doesn't protect access to source code. The "-SA" part simply means, "I'll share this piece of work, and you can use it as long as you then share yours under the same terms". But there is no mention of alternate forms; this only covers the final, publicly-available form. So someone is perfectly within their rights to take CC-BY-SA code, produce a derivative software, and only share the binary under CC-BY-SA. By contrast, GPL explicitly mentions source code, and requiring the distributing source code, when you convey alternate forms such as binary form.
It doesn't protect against patent disputes. This may or may not be important, as evidenced by many software licenses also not mentioning patents, but for some use cases it is very important.
It isn't compatible with major software licenses. The FAQ specifically mentions GPL incompatibility, that is, it's impossible to combine and distribute CC-BY-SA and GPL licensed code in the same piece of software. Since the body of GPL-licensed and GPL-compatible-licensed software is much bigger than that for CC-BY-SA, releasing using CC-BY-SA greatly limits the usefulness of the code.
When choosing a license, you should define what you're trying to achieve with the license. CC-BY-SA provides much weaker protection than copyleft software licenses, since it doesn't guarantee access to source code, but because it is so incompatible with other licenses, it is more restrictive in practice. It's very likely that there are much more appropriate licenses than CC-BY-SA, for whatever you're trying to achieve. For example, if access to source is not an issue, try a permissive license. If you want to ensure that your code remains freely available, try a copyleft license.
1: @kyll has mentioned that CC BY-SA version 4.0 has a one-way compatibility with GPLv3. This is specific to BY-SA content integrated in a GPLv3 project. Using CC BY-SA on still suffers from the incompatibility problem. From the FAQ:
Version 4.0 of CC's Attribution-ShareAlike (BY-SA) license is one-way compatible with the GNU General Public License version 3.0 (GPLv3). This compatibility mechanism is designed for situations in which content is integrated into software code in a way that makes it difficult or impossible to distinguish the two. There are special considerations required before using this compatibility mechanism. Read more about it here.