It's completely arbitrary. But giving the title of cofounder might make them feel more invested in the company. It'll be their "baby" as well.
If someone shows up in early days before a company has product market fit and is one of the people that truly shapes the business, call them whatever you want.