The locked cockpit door and low cost airlines have eroded the status and perks of the job and frankly you can earn more and enjoy a better life style in many other careers these days.
I would say that the standards to get into the profession have eroded.
Taking into account the responsibility one can not deny that this can only be complied with if the knowledge is up to speed with it.
In the 1970 and 1980 over 50 % of the pilots in the country I graduated from had a degree. ATPL courses took more than one year with a full day lesson plan.
Today it’s very different we have become buss drivers without culture or any significant in depth knowledge of what we are really doing hence, less respect.
Flying for a low cost or not makes no differance it's the CAA that sets the standards.
Cockpit open or closed is a silly argument.
I am sure if standards would be raised again you would get a completely different picture.