You launch the database server, give it a bunch of data to store, do you need to know where the data files are located? If MySQL or MariaDB does its job properly, the server just runs and runs with no need for further maintenance. But of course, software being software you need to do a bit more. For example, if the system crashes you might need to do a low-level recovery of the databases as I had to do - How to restore a MySQL database and tables from .frm .ibd or .myd raw database files
For various reasons you do need to know where MySQL/MariaDB stores its data files. It's not that hard to locate, and with a little change to the configuration file you can even change that location.