Job asks this question in order to make a statement. Alternate translation: "God should not give life to a man and then take away his future and confine him." (See: [[rc://en/ta/man/jit/figs-rquestion]])
Here a man who has difficulties and is in danger is spoken of as if God had put a hedge around him so he could not move. (See: [[rc://en/ta/man/jit/figs-metaphor]])