Salmonella is eliminated at 165F. Cookies get to around 190-205F when fully baked. So there's at least 25 degrees Fahrenheit between completely safe from salmonella and fully baked cookies.
Yep. Specifically it’s because the flour is not generally sanitized/processed in any way that removes bacteria from the grain or the finished product.
Flour is traditionally only used as an ingredient and will through the cooking process experience heat high enough to kill any bacteria.
If you want to make safe cookie dough to eat raw at home just spread the flour on a sheet tray and toast it in the oven at ~200 degrees for something like 10 minutes. There’s specific directions online.