I don't really know the answer to this question. Often the reason of specific sap is as some sort of defence. This LINK seems to suggest that this is the case, but doesn't really answer the question.
This defence idea is also referenced in this article but also says that ist primary function is to act as protection against bacteria and fungus attack as it dries to a film if the plant is injured.
_________________
Chris43, moderator