But, why would the site need cookie to transmit the session ID? when part of the reason for using a session ID is when cookie is not allowed.
That is a misconception on your part. Sessions can replace cookies, the query string and forms in passing/maintaining data, but ultimately the session id itself must be passed either by using cookies, the query string, or as form data.
Using session, one can retrieve the id from either SID or session_id()
The script can retrieve the id by those methods, but the server cannot, since it must have the session id provided by the client in order to know which session belongs to the client.