The Allies attacked on the Western Front because of treaty obligations to do so, ;and because the Russians were beginning to suffer devastating losses, of both manpower and territory, quite early in the war.
The Western Allies were, rightfully, fearful of what the Germans could accomplish on the Western Front having once disposed of the Russian Army. Witness their spring 1918 offensive, which almost certainly would have broken the Western Front open if not for the availability of American forces to plug the gap at Chateau Thierry.
These losses on the Easter Front would lead to the complete collapse of the Russian Empire itself in April 1917, followed within months by its withdrawal from the war. The Western Allies were attempting to prevent this.
Note that the unsuccessful Gallipoli Campaign was another attempt to ease pressure on Russia (and provider her with Lend-ease like supplies)
Here is a fascinating day-by-day animation of the entire war, world-wide.
Note that by late in the War, some commanders amongst the Western Allies had divined how to win battles without extreme casualties The French expended an estimated 150,000 casualties attempting to take Vimy Ridge during the Third Battle of Artois, yet the Canadian Corps successfully captured and held the ridge in April 1917 with barely 10,000 casualties. Sir Arthur Currie and Sir Julian Byng don't get enough recognition for this achievement.