Usually when there are some electrical or mechanical issues in the cars which owners cannot figure out easily, they prefer selling their vehicles instead of addressing the issues in the right way.
This issue might be pre-existing in the car. If you will call & ask this to previous owner, he will say that no no no no. car was running like showroom condition and there was not a single issue before. Its sad but yes people do lie like this.
Anyway, there can be couple of reasons which a common electrician can find.
Check the connection of alternator. Seems some of its connections are lose either with ground or with battery.
How old is the battery? What is the battery health percentage ?
Has any additional electronic gadget installed like woofers, big horn, or after market LED lights etc ? If yes, then ask electrician to make sure its wiring is properly through fuse box.