They "don't." They don't have anything, they're prediction engines. But they predict "emotional" responses just the same as they predict any other sort of response.

> I'm treating them like a [...] database

This is the very, very wrong part. They are nothing like databases. Databases are trustworthy; basically filing cabinets. LLMs are making it up as they go along, but doing a pretty high quality job of it.