More than 25 years experience of working in news. For main stream papers and publications, editors tend not to write headlines except for the front page or something special, even then that's quite often done in meetings depending on your editor. Sub editors generally write headlines and can in some cases change copy quite drastically, people fight over it sometimes but I've certainly never heard of anyone resigning. Sub editors are where the power lies!
What you call a sub editor is called 'lector' in my country. They wield significant power but they don't "generally write headlines". They proofread and they correct. If there's an egregious grammatical or spelling error they will set it right without a second thought, but if the correction involves a stylistic alteration, you would normally correct it while consulting the author with an agreeable "don't you think this is better?" or "I'm changing it to this, just so you know". If the change involves not just style or emphasis, but
meaning, this consultation is likely to take place
a fortiori.
The likelihood of an 'intervention' increases depending on the journalistic genre. It's more common in factography and it's extremely rare in interpretive and analytic genres. If I was writing analytic genres and someone insisted on writing my headlines for me
all the time, without a word of consultation I would most definitely resign.
Lectors and editors will hold talks with
new journalists outlining general expectations, direction and abstract preferences. Then they will go over texts with the author to show specific examples so he can know what their expectations are.
After the initial period though, you are generally expected to come up with your own headlines. They are of course subject to change for a myriad of reasons, but you should never expect that the lector should come up with a headline for you
constantly, unless you are working at a tabloid.