I guess it is vagrant up command which creates homestead databases for mysql and postgresql.
I misread the configuration doc. I didn't see that there are in fact two database.php files. One located in app/config/ and another in app/config/local. I was editing values in the one in config folder. But as I am in a local environment the database.php located in app/config/local was read and overwrote my values.