A plain mariadb-dump shop only holds tables. Feed it to a fresh server and you first have to create the database by hand and name it on the command line.
With --databases the dump carries that part itself:
mariadb-dump --databases shop blog > shop-blog.sql
grep -E '^(CREATE DATABASE|USE)' shop-blog.sql
The grep shows a CREATE DATABASE IF NOT EXISTS `shop` and a USE `shop`; line before each database’s tables. Restoring is then one command with no database name:
mariadb < shop-blog.sql
I like it even for a single database, because the file says where it belongs. Without the flag, every name after the first one is read as a table name, so mariadb-dump shop blog means “table blog in database shop”, which is a confusing error to get at 2 a.m.
That self-contained style has a downside when you want to restore into a different name, for example shop_test next to the real one. The USE line sends everything straight back into shop. For a copy under another name, dump without --databases and pass the target name to mariadb yourself. mysqldump on MySQL has the same option.
Further reading: mariadb-dump documentation