To detect Earth-size planets, space is a better place to be, since it is more efficient and less expensive. Yes, the stars do vary in brightness all the time. In fact it is almost impossible to make a perfectly constant source of light. Fortunately, the stars we are most interested in are stars like our Sun. These are the most commonly seen dwarf stars and vary less than the change in brightness caused by an Earth-size planetary transit over the same time intervals as a transit duration.
Planetary transits have durations of a few hours to less than a day.
Even then most of the variability is in the UV, which is excluded from the measurements by the Kepler Mission . The FOV of the HST is about the size of a grain of salt held at arms length. There is almost never more than one bright star in the HST FOV at any one time. However, the FOV of the Kepler Mission photometer is about the size of your open hand held at arms length. The brightnesses have to be measured continuously, not just once in a while, since one does not know when to expect a transit to happen.