Salmon can be eaten raw so eating the salmon when it's not cooked all the way or undercooked salmon is perfectly safe to eat.
I prefer my salmon to be cooked and well done but my husband sometimes likes to eat salmon raw or sometimes halfway done.
He doesn't like the salmon fully cooked like I do and he's never gotten sick eating undercooked salmon or even raw salmon.
It's safe to eat salmon raw or undercooked but really it's not recommended because there is indeed a potential to get food borne illnesses from the salmon and cooking the salmon kills off that bacteria that could lead to the illness.
Raw Salmon also tastes bad to me but cooked salmon tastes very good to me.