Why do some words use duplicate letters seemingly without reason?

Because that is the way they are spelled in their original languages, before being borrowed into English. Vacuum is from Latin, Aardvark from Afrikaans/'South African Dutch', and Llama from Spanish. You might have heard that English is an eclectic language; these three words are a good example.

See etymology online:

Vacuum

Aardvark

Llama