In other fields, such as mechanical engineering, patents are required to describe an invention in enough detail that a person "skilled in the art" could reproduce it.
In the field of software, the patent merely has to describe the invention (software) well enough that it can be identified, not written. To match other fields, where it's common to require essentially full bluprints, it would make sense to require working source code (if only a reference implementation) for any software patent.
As is, the patenter "gifts" the public with the knowledge of an idea which is rarely in itself useful; the source code could at least be potentially useful.