Setting selected term_id with wp_dropdown_categories?

That’s because you don’t have the $terms[0] element. Use following code to get the first key of $terms array:

<?php
// Set the pointer to the first element
// you don't need this if there is the only array element
reset($terms);
// get the key of the current position
$selected_id = key($terms);

You MUST enable WP_DEBUG when on develop stage to see important information you don’t see now:

Notice: Undefined offset: 0 in /home/...
Notice: Trying to get property of non-object in /home/...