I need to understand why we should write all these steps to generate a key for DES algorithm using java:

```
DESKeySpec desKeySpec = new DESKeySpec(key);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey secretKey = keyFactory.generateSecret(desKeySpec);

```

can anyone explain?