A socialist believes that we have a right not just to life; we have a right to all the essential means of sustaining life, such as food, clean water, shelter, and so forth. An important right that many socialists say we do not have is the right to private property.
Justice, moreover, consists not only of everyone having adequate amounts of those basic rights; it consists also of the lack of large discrepancies in wealth and other resources between people.
Thus, for a socialist, the functions of the government are many and varied, everything from running electric and water utilities, to providing welfare benefits for those who cannot work, to running factories, and so forth. So socialists want the government to be in virtually every productive area of life. They maintain that governments are morally justified in being a part of all of those different areas.