In terms of accessibility, I assume the label element is more important as the name of the input element isn't visible anyways (for screen readers and people with CSS disabled). I agree with you though, it does seem like a headache to deal with for more complex (or multiple) projects - makes more sense to name the input field something unique that you can easily remember.