That would depend on the publisher. They are not required to provide an electronic version of the book but some do it to help sell the title. Usually you can check the copyright page in some and will have the last page at the end of the book that tells you it is included.
What you are asking is a selling feature of the book and some publishers even go as far to have it printed on the cover to encourage a purchase. Depending on when it was published, they didn't start including the electronic copy until approximately three years ago.