Indexes take up disk space and memory. The MySQL/MariaDB/PostgreSQL engines can use more complex indexes to read data requiring a single index where the conditioning fields are included in a more complex index.
Example here with 3 indexes:
struct index_a {
id_1 int,
id_2 int,
};
struct index_b {
id_1 int,
};
struct index_c {
id_2 int,
};
If we execute a query filtering on the id_1 field only (SELECT field1 FROM table1 where id_1 = 3), the database engine can use 2 indexes: index_b, which contains only id_1, and index_a, which contains id_1 followed by id_2.
However, if we execute a query filtering on the id_2 field only (SELECT field1 FROM table1 where id_2 = 6), the database engine can only use index_c.
Revisiting index_a, it is not valid because the database engine will read this index by finding the records discriminating on id_1 before the records discriminating on id_2. This is not an optimal path to find a result dependent solely on id_2. The order of the fields in an index is therefore important.
Finally, since index_a filters first on id_1 before filtering on id_2, it can filter solely on id_1, making index_b redundant (it takes up unnecessary disk and memory resources). Therefore, delete index_b as it takes up disk space and memory for nothing.