'You need to finish this job by 8:00 pm.' I regard that as not including 8:00, that at 8:00 it needs to already be finished or prepared, as in "The presentation begins at 9am, so your slides need to be ready by then." (You can finish them in the minute of 8:59, but 9am it needs to be ready because the presentation starts right then)
'You need to stay here until 8:00pm." I regard this as being as soon as the clock strikes 8, you are able to leave.