-loo roll, soap, electricity to light toilet and dry hands (or paper towels). water costs for flushing loo and washing hands if they are on a meter
-more people using the loo, particularly if it gets known that costa is the only place in town that lets you use their toilet = dirtier loo = more staff time spent cleaning it and complaints from actual paying customers about time spent waiting for loo and state of it, including the staff who usually have to use the same loo too.
Unless you've worked somewhere with public access toilets you have no idea how utterly grim people can be - shitting on the seat, deliberately blocking the loo, leaving a used tampon on the floor etc. and people who just run in and aren't going to sit back down to finish their drink (i.e. without the possibility of getting caught/shamed) are going to be more likely to be the ones who make a mess!
-also increases possibility of an accident, wear and tear, local junkies shooting up in it etc.
obviously if it was just 1 pregnant woman once a week, or even 1 a day these are very minimal costs/chances but that's the whole point - to OP she has a special reason for exemption, to costa if they let her in they've got no reason not to let any other pregnant/recently delivered woman, small child, elderly person, someone feeling sick/with cancer/stomach upset use it OR anyone who doesn't have any condition/special need at all but just says they do - so basically they have to let anyone lest they be accused of discrimination if they let 1 person use it and not others.
so if it costs even as little as 5p for 1 non-customer to use the toilet, if 50 people a day do it (very possible in big town centres with minimal loos) that's £900 a year loss.
If worse comes to worst and a random decides to fuck up the loo for whatever reason - by deliberately clogging it up (or as happened in a local doctors surgery pouring concrete down it!) - it could mean the whole shop has to shut down until it's fixed, causing hundreds/thousands of pounds.
Which MIGHT be offset by goodwill, or might not given the vast majority won't come in there again, or are even put off - no that costa has the horrible toilets/there's always a long queue, let's go to the starbucks down the road.