A lot of what Amazon does is basically subsidized by AWS. That's where they make the bulk of their money I have heard. That means they can take a loss on shipping in order to drive out competition.
Years ago, when I was a Prime member (back when it was $79/year or less), I calculated that the $79 would be a lot less than what I would have spent on shipping costs. And then, as Amazon intended, you wind up ordering more from Amazon because of the "free" Prime shipping. Granted, a lot of Prime goods are priced higher to offset the "free" shipping but if you compare prices, a lot of times you would still save big on shipping.
Of course, people like me were probably the ones that led to the "add-on" policy where certain items only qualified for Prime shipping if you met a certain threshold for your order. Because, before that, I would sort of test Prime. I once ordered a box of crayons for like $1-something and got it shipped free via Prime. You can't tell me Amazon made money on that.
Not to mention one time I ordered an item and I got the packaging but not the item. It was one of those where it was in a blister-pack on a piece of cardboard. Evidently, it wasn't sealed well so the item had to have fallen out before it was shipped to me. So whether it was a stock person or a robot, whoever put the blister-pack in my box did not notice it was devoid of the product. In order to get a replacement, they actually made me send back the empty blister-pack and they paid the return shipping. Then after getting my refund, I had to reorder a replacement which was then sent via Prime.
There was no way the $79 per year covered the actual shipping plus whatever expenses they had for whatever stuff they included in Prime that I never used. (I only used it for "free" shipping.)
And now Amazon has their own delivery trucks and more local warehouses. So, yes, they can undercut other sellers, especially with small orders. A number of places offer free shipping if your order meets a certain threshold but shipping on small orders can be expensive.
And for a book? Say a small bookseller has to charge $10 shipping for a book or two. You might think, well, I can go to Amazon, buy the books there and buy some other things to either qualify for free shipping or maybe you have Prime. You might say Amazon is hiding the shipping cost somewhere but they can cut that down with their own delivery service plus maybe the books are $10 each from the small bookseller, so you'll pay $30 with the shipping but Amazon charges $12 per book, so you pay $24. You'd have to buy five books for the small bookseller to be competitive with Amazon.
I don't know if France's plan will work or if Amazon and other Big Tech companies will find a workaround. Politicians are generally idiots and cause more problems than they solve. But, at any rate, something needs to be done about companies like Amazon because they are getting too monopolistic.