Various compounds, including caffeine, that are present in coffee beans have antimicrobial properties. Additional Maillard reaction products that have antimicrobial properties are created by roasting. Coffee is also pretty acidic - IIRC, dorm cafeteria coffee turned chem lab blue litmus paper a pretty red.