I think the first question you have to ask is why do you think Russia should have won?
Russia lost the war mainly because of the attitude the question has inherent in it, how could a European Great Power lose to an Asiatic island country? There was a huge amount of arrogance in the Russian Empire and the leadership of the military. The Japanese also played to their strong advantages, mainly that they fielded a far better structured Navy that used quick surprise attacks to first destroy Russian Navy at Port Arthur, and then to find and sink their Atlantic fleet at the Battle of Tsushima. This led to the Japanese having complete naval control of the theater of war.
The other major issue for the Russian's was that the supply lines to the war were far, really really far. Majority of the population, industry, and military infrastructure is in the European region of Russia, mainly to the west of the Ural Mountains, while the fighting in the Russo-Japanese war was fought on the far east of the Russian Empire. While the Trans-Siberian railroad did exist at this point, it was still over a week to travel from Moscow to Vladivostok. The long term cost of the war strained the Russian Empire's finances as well. There was a possible multitide of answers here, however the crux of it was Russian malaise in their military, long supply lines to the front crossing thousands of miles, superior Japanese tactics in the sea but also on land, and ultimately Russia feeling the strain both financially and then domestically that led to the Treaty of Portsmouth.