Hey there!
So
function is what the author/speaker is directly trying to do with the text. They are creating the text and are doing so to fulfil this particular task. For instance, the function of the ABC News is to inform about the day's events, while the function of a stand-up comedian's routine is to entertain the audience. There are many other possible functions, such as persuading, honouring, commemorating, celebrating, instructing and promising.
On the other hand,
social purpose is what the author/speaker is trying to do
socially. Often (but not always) this is to do with decreasing or increasing social distance. For example, the stand-up comedian's routine is probably very informal, and so the social purposes may be to build rapport, encourage intimacy and support in-group membership. On the other hand, the ABC News broadcast is very formal, with possible social purposes of establishing expertise, reinforcing social distance and establishing credibility. VCAA kindly lists some of the common social purposes in the Study Design (link
here, p.20-1), so definitely check that out.
(oh, and "social function" isn't a term used in EngLang)