The name goes back to the Tang imperial library, which kept its books in four repositories labeled
甲,
乙,
丙 and
丁, one for each category. The four-part scheme stayed the standard way to catalogue Chinese books until modern library classification replaced it.