It is sad but true that without strict enforcement of anti-piracy laws, and in the absence of broad cultural perceptions that consider the act of acquiring and reading a pirated ebook as either criminal or unethical (and I am talking society and culture here, not intellectual property laws or their enforcement) any reader who can get an ebook free is unlikely to insist on paying for it or buy a physical copy. They will simply read the book, and use the money saved there for some other purpose, such as buying a memory card for their mobile phone. There might indeed be communities where many people would rather pay for their books or ebooks, but that indicates to me a broad cultural understanding in those communities that pirating ebooks is criminal or unethical. That is however not yet understood in every part of the world.
Circumstantial exceptions that might tempt a reader to choose an unauthorised 'free download': Sometimes the physical book or even a legitimate ebook is unavailable or no longer available for purchase via bookstore or online shopping in the reader's country or locality, or else the reader does not possess electronic payment means such as a credit card to complete the online purchase transaction. [I know many people who do not have any credit cards or debit cards or any other online payment options mainly because they consider it a risk for online fraud.]
In short, a reader reading a pirated ebook represents an actual sale lost only whenever the person had the motive, means and opportunity to buy a legitimate ebook or physical copy, but still chose piracy simply because it was easier, cheaper and socially not unacceptable to acquire and read a pirated ebook, irrespective of intellectual property laws or digital rights.
This is the hard reality for writers in the digital age, but forms of piracy existed even before ebooks and the internet. Also, @Mark Baker in his answer here has made the pertinent point that even in pre-digital eras, the author was not being paid for every time their book got read by a new reader, since many readers would borrow books from their friends, a library or the hotel; get gifted second-hand physical copies; or buy second-hand physical books whose resale does not create royalties for the writer. All of which practices continue in the digital age (even if some studies seem to suggest that reading as a whole is quantitatively on the decline, and even though friends will tend to 'send/receive' digital copies rather than share physical books, whenever digital sharing is the convenient option). Add large scale indiscriminate online piracy to the mix and it's the last straw that can break the author's back!
@Mark Baker also notes that the type of person who reads a pirated ebook is not the type of person who would actually pay for it if it weren't illegally obtainable for free, but I think there are far too many easy ways available at present for even specifically interested readers to read an ebook without needing to pay the publisher or the author in order to get access to the written work, so the widespread "free sharing" of ebooks does represent an additional drain on potential (if not necessarily actual) sales.
However, it can be sobering for every author or potential author to reflect that, if digital rights were strictly enforced, your work would still only be paid for and purchased by somebody who considers it a work worth paying good money to buy and read, even if that person is ethically against piracy and would never read a pirated work. So the free circulation of pirated ebooks actually gives many authors a 'casual' reader base, many of whom wouldn't read the book if they had to pay for it, but at least some of whom could form a dedicated fan base and/or might later be ethically motivated to pay for the writer's hard and honest work.
On the other hand, as also pointed out by @Mark Baker in comments, DRM is always an option. But if enough digital locks (read DRM) are placed on a work to absolutely prevent piracy, could that possibly affect your legitimate sales via legally purchased ebooks and physical copies? Also, is the publisher/distributor who guarantees you complete digital protection really capable of getting your work the best possible exposure and earn for you the maximum possible revenue? That is what you need to work out for your particular case. On the broader societal level, individual readers need to take an ethical stand against helping themself to "free" ebooks and communities need to develop the cultural consciousness that reading pirated ebooks is unethical and a crime.
Most people tend to commit actions that they personally and their community in general don't consider unethical, whatever be the legal position -- and obviously a huge number of people still do not consider piracy unethical. So this trend is likely to continue until cultural values change to reflect the unethicality of piracy, or 'until laws come down harsher on this type of theft and a way to hold people accountable, so this act becomes not worth the hassle', as noted by @ggiaquin in a comment.