db_update query in custom installation profile gets ignored
db_update it is a selectable object. It builds SQL queries. https://api.drupal.org/api/drupal/includes!database!database.inc/function/db_update/7

Yes. Everything is in database. You can changes by queries. You should use api functions or common approaches.

Theme data is stored as variables, for Drupal it is enough.

variable_set('theme', 'my_theme');
variable_set('admin_theme', 'theme_name');


https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_set/7
It says that if you want change it by queries you need update the variable table.

Also when you manipulate with cache-able objects(blocks here) you need clean cache.

cache_clear_all();