TL;DR: Ukraine is a Parliamentary-Presidential republic.
On the other hand, the President is the commander-in-chief of the country's Armed Forces.
This introduces a natural delay in the chain of commandment in case of a sudden aggravation of the situation.
The primary goal of martial law is to eliminate this delay, allowing the immediate armed response.
Also, it is internationally recognized act of war, so according to most country's Constitutions and Laws, an act of war should (must) be met with martial response.
Let me briefly touch the moral side of the question, "what is the benefit of declaring a martial law?", e.g., "what is the benefit of declaring your readiness to fight back when you get robbed in the dark corner?"
— well, your "benefit" is to stay alive. Let me not elaborate further as I believe it would be offtopic at Politics site.
Instead, let me expand the question:
"What is the benefit of declaring a martial law comparing to [an alternate solution]?"
The Anti-Terrorist Operation Was Sufficient In 2014-2018
Despite the fact that the Russian armed aggression and illegal occupation has started no later than on February 2014, the Russians put all their effort to make it look like "Ukrainians are at war against Ukrainians":
- The Russian occupation forces who invaded Crimea have teared off their insignia, painted over the marks on their military vehicles, etc. — which produced a meme of "little green men";
- In the East Ukraine, the Russians hired thousands of collaborationists who formed the "front line" of its occupation forces. When they got killed in action, this let the Russians claim the "civil war among Ukrainians" who kill each other;
- When in August 2014, Ukraine has started the liberation of temporarily-occupied territories of Donets'k and Luhans'k regions, the Russia has invaded with its active soldiers on duty; these soldiers, naturally, began to get eliminated or captured in action. At that time, the Russian commandment claimed that these people "just dismissed yesterday" and "privately went to Ukraine on vacation";
- In addition, our partners have not affirmed any escalation by Ukraine, above a certain (very low) threshold.
All in all, there was no "official" Russian war against Ukraine at that time. Officially, it was recognized as a terrorist activity, and these threats, most naturally, have been met with the declaration of "Anti-terrorist operation", not a martial law.
Why Not the Declaration Of War?
On November 25, 2018, first time since 1940, the Russia has openly attacked a European country, not even bothering to tear off its insignia or hiding its flags, like it did all the time.
Forget Brexit, war in Ukraine is the biggest threat to Europe.
The diversion of the Russo-Ukrainian conflict into the Sea of Azov is precisely the kind of escalation that has preceded Europe’s past cataclysms. — Simon Jenkins, "The Guardian"
3/3 Silent acknowledgement means de facto recognition of the occupation of Crimean peninsula. The value-based international community cannot allow itself to adopt such a stance. War in Europe will not, shall not and can not ever again be accepted as business as usual. #Ukraine — Kersti Kaljulaid, the President of Estonia (highlight mine)
So, it's an act of war against the Europe, and the Europe's mutual response must be negotiated (I personally hope it will).
Most European countries are Parliamentary-Presidential Republics, too; they also need time for negotiating the defense.
What Ukraine can do meanwhile is not to get defeated while the Europe prepares its response.
In order to accomplish that, the Ukrainian Armed Forces should be ready for a response in minutes, not days.
As I said, the Parliamentary-Presidential republic, while it has natural benefits of democracy, is slow at immediate armed response:
- The Ukraine's Parliament is not unanimous (unlike dicktatorships where a single Putin is the only authority to issue orders). There are parliamentary factions that engage in long "trade" for each bill or decision.
- There are also remainders from the times of the puppet government of Yanukovych. They are historically tied to Russia and resist anytime it is against the Russian interest. The more their role will be if the open invasion begins.
So, in case of a further aggravation of the situation, it is possible that the President will not be able to issue the orders to fight back and defend the Ukraine's soil. Let's yield the floor to the President:
Воєнний стан буде застосований виключно у випадку наземної російської воєнної агресії. І як тільки російський солдат перетне кордон - я не буду втрачати жодної секунди для того, щоб забезпечити захист української землі (source)
The martial law will be triggered exclusively in case of the Russian armed aggression by land. As soon as the Russian soldier crossed the border, I will not waste a single moment to ensure the defense of the Ukrainian land — Petro Poroshenko (translation and highlight mine)
Why Not Just Sit Back And Wait Them To Kill Us
Well, this seems a ridiculous section, but let me cover it as well. The President:
Мета воєнного стану – показати, що противник заплатить дуже високу ціну, якщо він вирішить напасти на нас, і що це буде як холодний душ, який зупинить божевільних, які мають плани атакувати Україну. І якщо агресії не буде, вважайте, що мета цих дій досягнута (source)
The goal of the martial law is to demonstrate that the enemy will pay a very high price if it decides to attack us; this would be a cold shower for them that would stop the madmen who have plans to invade Ukraine. And if there is no aggression, consider that the goal of these actions [the martial law] has been accomplished. — Petro Poroshenko (translation and highlight mine)
Summary: the declaring of the martial law has the "benefit" of quick armed response in case of the Russian land attack and letting Ukraine survive while the Europe prepares its decision on how to defend.