…or is it just a random spelling variation?
Etymologically they have different sources: -ent is from Old French from the Latin suffix -ēns, -ent. -ant is from Old French from the Latin suffix -āns, -ant. It had to do with which class the Latin word was part of.
Great answer morphail!