why enqueued styles in header.php shows in footer?

The reason this is happening is that enqueued scripts and styles are output on wp_head at priority 8, but your addMyStyle() functioning is running at priority 10, the default. This means that it’s too late to enqueue scripts and styles for the header. You could use a lower priority, but wp_head is the wrong hook to use here anyway. You should be using wp_enqueue_scripts.