The Scrum team decides the length of the Sprint (dev team + PO + SM). They do the actual work, so they choose the duration of the time-box they feel more comfortable with in order to produce a product increment.
With that being said, there are of course all sorts of other things happening in the company that may influence what decision the Scrum team makes. You mention some of them in your question. If that happens, the team can always change the sprint duration. You don't need to keep the same length all throughout the project. You start with whatever works for you, then inspect and adapt.
Maybe you start with two weeks but stakeholders might want to have a shorter feedback loop, so you switch to one week sprints. Or maybe you work in some complex domain and the PO might want to have more "meaty" increments, so maybe they suggest three week or four week sprints. But then maybe you see that a greater iteration length introduces too much risks or assumptions, so you go back to something shorter.
It's a good idea to retain a constant sprint length throughout the development of your product (helps with planning, forecasting, etc), but if you realize that a different length would be more beneficial (for whatever reasons) you can switch. You are not stuck with one sprint length forever.