It's just an arbitrary combination of words that has to be learned. the cost to is not used, but the cost of is used. The preposition of often has to do with having .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.