Set homepage as most recent content post

Maybe a better question is why the else statements in this pagination snippet return website.com instead of website.com/first-article. Going off of this thread: Navigation / pagination loop

<?php
if($page->hasNextVisible() || $page->hasPrevVisible()): ?>
  <nav class="pagination wrap cf">

    <?php if($page->hasPrevVisible()): ?>
      <a class="pagination-item nav prev" href="<?= $page->prevVisible()->url() ?>" rel="prev" title="<?= $page->prevVisible()->title()->html() ?>">&rsaquo;</a>
    <?php else: ?>
      <a class="pagination-item nav prev" href="<?= $page->last()->visible()->url() ?>" rel="prev">&rsaquo;</a>
    <?php endif ?>

    <?php if($page->hasNextVisible()): ?>
      <a class="pagination-item nav next" href="<?= $page->nextVisible()->url() ?>" rel="next" title="<?= $page->nextVisible()->title()->html() ?>">&lsaquo;</a>
    <?php else: ?>
      <a class="pagination-item nav next" href="<?= $page->first()->visible()->url() ?>" rel="next">&lsaquo;</a>
    <?php endif ?>

  </nav>
<?php endif ?>