What is the purpose of update() in popular hash APIs? E.g., in Python's hashlib, update() basically merges in string buffer functionality into the object. Several other digest APIs I've seen have this pattern.

Considering this adds functionality that arguably doesn't belong here, why is this pattern popular?
Being able to generate hashes incrementally (by presenting parts of the string being hashed) is there for basically two reasons:


It's commonly useful in practice.  Quite often, we don't have the entire string in one contiguous segment; instead, we often have parts laying around separately.  For one simple example of this, consider the
HMAC
function; the inner hash is some preprocessed keying material, followed by the message being MAC'ed.  We could create a temporary buffer consisting of the HMAC inner key ("ipad") and the message, but why?
It's actually easy to do with our current hash function (including SHA-1, all the SHA-2 versions and SHA-3).  You appear to think that the Python hashlib library copies the parts of the message being hashed into a buffer, and then runs the hash on the entire buffer.  That's extremely unlikely to be how they implement it; instead, it is easy (with a small amount of side memory) to have the hash process the message in pieces.


So, the answer is: they provide this functionality because people find it useful, and its easy for the library to do.