They spit if they're hit. Be careful not to accidentally hit them when putting on leashes or carpets. Otherwise this sounds like a bug if more people are having it. I haven't tamed any llamas in ages so I can't be sure, but the wandering trader's llamas had a spit fest at me the other day! I think I accidentally clouted them though lol.
well there might be a fix to this try being a bit more friendly than you already are to them try riding them a bit more feeding them try fruit hay etc and let them out daily(on a lead not like leave them!) I have 3 llamas of my own there names are Annie luna and caramel the are nice llamas I haven't had this problem yet but this might help also when leading them or putting on a llama saddle try not to hit them hope this helped bye have a good day!