Sure, there are regulated processes around some types of contracts. There are regulations about what's legal to put in a contract, but here's no government employee who shows up to the meeting to make sure it's all perfectly legal. You certainly can form a non-legal contract. The government may never become aware until there's a dispute and it goes to court.