The date was chosen due to events that happened in America. In 1884 the American Federation of Organized Trades and Labor Unions demanded an eight-hour workday, to come in effect as of May 1st 1886. This resulted in the general strike and the Haymarket (in Chicago) Riot of 1886, but eventually also in the official sanction of the eight-hour workday.
The custom spread to Europe and on to the Soviet Union. Its association with communism and socialism is why even though it marks events in America, America celebrates Labor Day on a different date.
The start of May was a useful date on which to hang this holiday as it had been a time of festival and holiday since ancient times. Its roots as a holiday stretch back to the Gaelic Beltane. It was considered the last day of winter when the beginning of summer was celebrated.
During Roman times, May 1st was seen as a key period to celebrate fertility and the arrival of spring.
In the UK, Labour Day on May 1st was never adopted. A holiday on the first Monday in May was one of the original bank holidays in Scotland. The rest of the UK only started observing the holiday in 1978. And even then, it is sometimes moved, such as in 2020 when it moves to the Friday after the first Monday to mark the 75th anniversary of VE Day.