This is part of the problem, and, in fact, part of the work of a software developer: given ambiguous and stupid requirements, you work with the customer to 1) make them clearer and 2) get rid of the unnecessary, complex requirements that do not bring any bussiness value. (My experience here shows though that it's not a standard thing in Indian culture to question the status quo).
There's a lot of implicit requirements that need to be taken into account when writing code: maintainability, security, performance, user experience, accessibility etc. It's better if everything is explicitly stated, but we don't live in a perfect world unfortunately. (My experience here shows that those implicit requirements are often not well executed, particularly when it comes to front-end code, due to a mix of: lacking experience, time pressure, different UX sensibilities).
There's a lot of implicit requirements that need to be taken into account when writing code: maintainability, security, performance, user experience, accessibility etc. It's better if everything is explicitly stated, but we don't live in a perfect world unfortunately. (My experience here shows that those implicit requirements are often not well executed, particularly when it comes to front-end code, due to a mix of: lacking experience, time pressure, different UX sensibilities).
Obviously, YMMV.