This is no offence to the developers. Developers are as close to the code as it gets. Thus, they should write unit tests. But, developers should not write End-to-End tests. This is to reduce the chances of the developer running a biased tests or a lack of creativity in testing. Someone who knows what the software will be used for must write the tests. This is usually someone from the product team, e.g. the Product Owner.