portandlemon it costs business because of things like the fact that pregnant women now get all their benefits for the whole time they are off costs money, and the fact that they also accrue all their holiday as normal as well giving them potentially another 5 weeks to tack on to their maternity leave which may require cover.
Cost of employing a replacement is higher than just the cost of SMP, there might be recruitment costs, lost productivity due to someone being new, higher salaries for temps, benefits for the temps and various other 'hidden' costs.
Apart from the fact that's it's obviously wrong and illegal to discriminate anyway, I don't actually agree that it makes more sense for employees on maternity leave or working part time to go first. Employees on maternity leave are not receiving salary, so are cheaper than normal employees, as long as no maternity cover is employed, so it's better and more cost effective to keep them on maternity leave, let someone receiving full salary go and then review the situation once the individual on maternity leave is coming back. It might make sense in terms of feeling less disruptive to let someone go who isn't in the office anyway, but otherwise it doesn't imo.
SImilarly part timers are cheaper than full timers. It would be better in many cases for employers to retain as many people as possible, in terms of expertise and flexibility, for example, while saving costs in terms of hours. Therefore keeping 3 part timers might well make more sense than keeping 2 full timers, for example.