Decoder-Only or Encoder-Decoder? Interpreting Language Model as a Regularized Encoder-Decoder